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
7578583f
Commit
7578583f
authored
Jan 10, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改质检工单报工逻辑,可报工数=被检工单报工数
parent
b01aa992
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
sdddl_project/models/inherit_roke_work_order.py
+12
-0
No files found.
sdddl_project/models/inherit_roke_work_order.py
View file @
7578583f
...
@@ -46,3 +46,15 @@ class InheritWorkOrder(models.Model):
...
@@ -46,3 +46,15 @@ class InheritWorkOrder(models.Model):
'default_work_order_id'
:
self
.
id
,
'default_work_order_id'
:
self
.
id
,
}
}
}
}
def
_get_wo_allow_qty
(
self
):
if
self
.
is_quality
:
# 质检工单的可报工数取被检工单的数量
# 待检数=被检工单所有报工数合计
allow_qty
=
sum
(
self
.
quality_origin_wo_id
.
record_ids
.
mapped
(
"finish_qty"
))
+
\
sum
(
self
.
quality_origin_wo_id
.
record_ids
.
mapped
(
"unqualified_qty"
))
-
\
self
.
quality_origin_wo_id
.
qualified_qty
default_qty
=
allow_qty
else
:
allow_qty
,
default_qty
=
super
(
InheritWorkOrder
,
self
)
.
_get_wo_allow_qty
()
return
allow_qty
,
default_qty
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