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
53518447
Commit
53518447
authored
Mar 14, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 工艺设计
parent
cec53239
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
sdddl_project/models/inherit_production_task.py
+7
-9
No files found.
sdddl_project/models/inherit_production_task.py
View file @
53518447
...
...
@@ -26,7 +26,7 @@ class InheritProductionTask(models.Model):
(
'sub'
,
'子任务'
)
],
string
=
'任务类型'
,
compute
=
'_compute_task_type'
,
store
=
True
)
main_task_code
=
fields
.
Char
(
string
=
'主任务编号'
,
compute
=
'_compute_
main_task_cod
e'
,
index
=
True
,
store
=
True
)
main_task_code
=
fields
.
Char
(
string
=
'主任务编号'
,
compute
=
'_compute_
task_typ
e'
,
index
=
True
,
store
=
True
)
flowing_water
=
fields
.
Char
(
string
=
"物料流水"
)
...
...
@@ -132,26 +132,24 @@ class InheritProductionTask(models.Model):
if
not
self
.
routing_id
:
routing_id
=
self
.
env
[
"roke.routing"
]
.
create
({
"name"
:
f
"{self.product_id.name}({self.code})"
or
""
,
"routing_task_id"
:
self
.
id
})
self
.
write
({
"routing_id"
:
routing_id
.
id
,
"state"
:
"确认"
})
self
.
write
({
"routing_id"
:
routing_id
.
id
})
self
.
product_id
.
write
({
"routing_id"
:
routing_id
.
id
})
self
.
write
({
"work_order_ids"
:
self
.
change_routing_id_work_order
(
routing_id
)
})
el
if
not
self
.
routing_id
.
routing_task_id
or
self
.
routing_id
.
routing_task_id
.
id
!=
self
.
id
:
el
se
:
routing_id
=
self
.
routing_id
.
copy
()
routing_id
.
update
({
"name"
:
f
"{routing_id.name}({self.code})"
,
"
routing_task_id"
:
self
.
id
"
state"
:
"确认"
})
self
.
write
({
"routing_id"
:
routing_id
.
id
})
self
.
product_id
.
write
({
"routing_id"
:
routing_id
.
id
})
self
.
write
({
"work_order_ids"
:
self
.
change_routing_id_work_order
(
routing_id
)
})
else
:
routing_id
=
self
.
routing_id
return
{
"name"
:
f
"工艺设计({self.code})"
,
"type"
:
"ir.actions.client"
,
...
...
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