Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
273b2677
Commit
273b2677
authored
Jan 10, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改前端工艺设计
parent
2fb3af5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
sdddl_project/controllers/inherit_production_task.py
+4
-4
No files found.
sdddl_project/controllers/inherit_production_task.py
View file @
273b2677
import
logging
import
pytz
from
odoo.osv
import
expression
from
odoo
import
models
,
fields
,
api
,
http
,
SUPERUSER_ID
,
_
from
odoo.addons.roke_workstation_api.controllers.product_task
import
RokeWorkstationProductionTask
from
odoo.addons.roke_workstation_api.controllers.work_order
import
RokeWorkstationWorkOrder
...
...
@@ -214,13 +215,12 @@ class InheritRokeWorkstationWorkOrder(RokeWorkstationWorkOrder):
return
{
"code"
:
1
,
"message"
:
f
"入参错误! “工位ID”为必传数据。"
,
"data"
:
{}}
domain
=
[
"|"
,
"&"
,
"&"
,
"&"
,
(
"task_id"
,
"="
,
task_id
),
(
"process_id"
,
"in"
,
process_ids
),
(
"state"
,
"in"
,
[
"未完工"
,
"暂停"
]),
(
"work_center_id"
,
"="
,
False
),
(
"work_center_id"
,
"="
,
work_center_id
)
(
"work_center_id"
,
"="
,
False
)
]
domain
=
expression
.
OR
([
domain
,
[(
"work_center_id"
,
"="
,
work_center_id
)]])
domain
=
expression
.
AND
([[(
"task_id"
,
"="
,
task_id
)],
domain
])
if
work_order_id
:
domain
=
[(
"id"
,
"="
,
work_order_id
)]
work_order
=
_self
.
env
[
"roke.work.order"
]
.
search
(
domain
,
order
=
f
"sequence asc, process_id asc, id asc"
,
limit
=
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment