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
a8553116
Commit
a8553116
authored
Jan 10, 2025
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改收料列表
parent
273b2677
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sdddl_project/controllers/roke_work_order.py
+5
-5
No files found.
sdddl_project/controllers/roke_work_order.py
View file @
a8553116
...
@@ -21,19 +21,19 @@ class InheritEntrustOrderMain(Main):
...
@@ -21,19 +21,19 @@ class InheritEntrustOrderMain(Main):
def
_prepare_entrust_info_data
(
self
,
entrust_orders
):
def
_prepare_entrust_info_data
(
self
,
entrust_orders
):
info
=
[]
info
=
[]
for
i
in
entrust_orders
.
filtered
(
lambda
l
:
l
.
plan_qty
>
(
l
.
finish_qty
+
l
.
unqualified_qty
))
:
for
i
in
entrust_orders
:
user_tz
=
pytz
.
timezone
(
http
.
request
.
env
.
context
.
get
(
'tz'
,
"Asia/Shanghai"
))
user_tz
=
pytz
.
timezone
(
http
.
request
.
env
.
context
.
get
(
'tz'
,
"Asia/Shanghai"
))
date_dt
=
pytz
.
utc
.
localize
(
i
.
plan_date
)
.
astimezone
(
user_tz
)
date_dt
=
pytz
.
utc
.
localize
(
i
.
plan_date
)
.
astimezone
(
user_tz
)
plan_date
=
date_dt
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
plan_date
=
date_dt
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
previours_work_order
=
i
.
_get_previous_wo
()
allow_qty
,
default_qty
=
i
.
_get_wo_allow_qty
()
plan_qty
=
i
.
plan_qty
-
sum
(
if
allow_qty
<=
(
i
.
finish_qty
+
i
.
unqualified_qty
):
previours_work_order
.
record_ids
.
mapped
(
'unqualified_qty'
))
if
previours_work_order
else
i
.
plan_qty
continue
info
.
append
({
info
.
append
({
'work_id'
:
i
.
id
,
'work_id'
:
i
.
id
,
'code'
:
i
.
code
,
'code'
:
i
.
code
,
'product_id'
:
i
.
product_id
.
id
,
'product_id'
:
i
.
product_id
.
id
,
'product'
:
i
.
product_id
.
name
,
'product'
:
i
.
product_id
.
name
,
'plan_qty'
:
plan
_qty
,
'plan_qty'
:
allow
_qty
,
'process'
:
i
.
process_id
.
name
,
'process'
:
i
.
process_id
.
name
,
'entrust_customer'
:
i
.
entrust_customer
.
name
,
'entrust_customer'
:
i
.
entrust_customer
.
name
,
'plan_date'
:
plan_date
,
'plan_date'
:
plan_date
,
...
...
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