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
f18812ae
Commit
f18812ae
authored
Nov 23, 2024
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改问题
parent
1f685a74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
jzjx_project/models/inherit_production_task.py
+5
-2
No files found.
jzjx_project/models/inherit_production_task.py
View file @
f18812ae
...
...
@@ -67,6 +67,7 @@ class InheritProductionTask(models.Model):
work_order_data
=
self
.
_get_new_work_order_data
(
routing_line
,
product
,
plan_qty
,
task_type
)
work_order_data
[
'planned_start_time'
]
=
date
work_order_data
[
'plan_date'
]
=
date
work_order_data
[
'priority'
]
=
self
.
priority
work_orders
.
append
(
(
0
,
0
,
work_order_data
))
else
:
...
...
@@ -86,6 +87,7 @@ class InheritProductionTask(models.Model):
work_order_data
=
self
.
_get_new_work_order_data
(
routing_line
,
product
,
plan_qty
,
task_type
)
work_order_data
[
'planned_start_time'
]
=
date
work_order_data
[
'plan_date'
]
=
date
work_order_data
[
'priority'
]
=
self
.
priority
work_orders
.
append
(
(
0
,
0
,
work_order_data
))
return
work_orders
...
...
@@ -138,7 +140,7 @@ class InheritProductionTask(models.Model):
def
craft_design
(
self
):
if
not
self
.
routing_id
:
routing_id
=
self
.
env
[
"roke.routing"
]
.
create
({
"name"
:
self
.
product_id
.
name
or
""
,
"name"
:
f
"{self.product_id.name}({self.code})"
or
""
,
"routing_task_id"
:
self
.
id
})
self
.
write
({
...
...
@@ -150,6 +152,7 @@ class InheritProductionTask(models.Model):
elif
not
self
.
routing_id
.
routing_task_id
or
self
.
routing_id
.
routing_task_id
.
id
!=
self
.
id
:
routing_id
=
self
.
routing_id
.
copy
()
routing_id
.
update
({
"name"
:
f
"{routing_id.name}({self.code})"
,
"routing_task_id"
:
self
.
id
})
self
.
write
({
"routing_id"
:
routing_id
.
id
})
...
...
@@ -159,7 +162,7 @@ class InheritProductionTask(models.Model):
else
:
routing_id
=
self
.
routing_id
return
{
"name"
:
"工艺设计
"
,
"name"
:
f
"工艺设计({self.code})
"
,
"type"
:
"ir.actions.client"
,
"tag"
:
"jzjx_project.roke_craft_design"
,
"target"
:
"current"
,
...
...
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