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
c4f7b918
Commit
c4f7b918
authored
Nov 13, 2024
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 返修单生产工单产品问题
parent
8c1d8ccb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
jzjx_project/controllers/inherit_production.py
+3
-3
jzjx_project/views/inherit_roke_mes_stock_picking_views.xml
+1
-1
jzjx_project/wizard/inherit_roke_create_work_record_wizard.py
+4
-4
No files found.
jzjx_project/controllers/inherit_production.py
View file @
c4f7b918
...
...
@@ -20,7 +20,7 @@ class JzjxInheritProduction(InheritProduction):
:return:
"""
res
=
super
(
JzjxInheritProduction
,
self
)
.
_get_work_record_values
(
wo
,
values
)
repair_pro
duct
_id
=
values
.
get
(
'process_id'
,
False
)
# 工序
if
repair_pro
duct
_id
:
res
.
update
({
"repair_pro
duct_id"
:
repair_product
_id
})
repair_pro
cess
_id
=
values
.
get
(
'process_id'
,
False
)
# 工序
if
repair_pro
cess
_id
:
res
.
update
({
"repair_pro
cess_id"
:
repair_process
_id
})
return
res
jzjx_project/views/inherit_roke_mes_stock_picking_views.xml
View file @
c4f7b918
...
...
@@ -55,7 +55,7 @@
<field
name=
"inherit_id"
ref=
"roke_mes_production.roke_mes_production_inherit_config_settings_form_view"
/>
<field
name=
"arch"
type=
"xml"
>
<xpath
expr=
"//div[@id='production_setting_main']"
position=
"inside"
>
<div
class=
"col-12 col-lg-6 o_setting_box"
title=
"返修自动生
产
工单"
id=
"refix_auto_work_order"
>
<div
class=
"col-12 col-lg-6 o_setting_box"
title=
"返修自动生
成
工单"
id=
"refix_auto_work_order"
>
<div
class=
"o_setting_left_pane"
>
<field
name=
"refix_auto_work_order"
/>
</div>
...
...
jzjx_project/wizard/inherit_roke_create_work_record_wizard.py
View file @
c4f7b918
...
...
@@ -7,7 +7,7 @@ from odoo.exceptions import ValidationError
class
InheritRokeCreateWorkRecordWizard
(
models
.
TransientModel
):
_inherit
=
"roke.create.work.record.wizard"
repair_pro
duct
_id
=
fields
.
Many2one
(
"roke.process"
,
string
=
"工序"
)
repair_pro
cess
_id
=
fields
.
Many2one
(
"roke.process"
,
string
=
"工序"
)
def
create_other_order
(
self
,
new_record
):
"""
...
...
@@ -18,12 +18,12 @@ class InheritRokeCreateWorkRecordWizard(models.TransientModel):
res
=
super
(
InheritRokeCreateWorkRecordWizard
,
self
)
.
create_other_order
(
new_record
)
repair
=
res
.
get
(
"repair"
,
False
)
refix_params
=
self
.
env
[
'ir.config_parameter'
]
.
sudo
()
.
get_param
(
"refix_auto_work_order"
)
if
repair
and
self
.
repair_qty
and
(
refix_params
==
"True"
or
refix_params
is
True
)
and
self
.
repair_pro
duct
_id
:
if
repair
and
self
.
repair_qty
and
(
refix_params
==
"True"
or
refix_params
is
True
)
and
self
.
repair_pro
cess
_id
:
repair
.
is_refix_auto_work_order
=
refix_params
==
"True"
or
refix_params
is
True
for
v
in
repair
.
line_ids
:
repair_work_order_id
=
self
.
env
[
"roke.work.order"
]
.
create
({
"process_id"
:
new_record
.
process_id
.
id
,
"product_id"
:
self
.
repair_
product_id
.
id
,
"process_id"
:
self
.
repair_
process_id
.
id
,
"product_id"
:
new_record
.
work_order_id
.
product_id
.
id
,
"plan_qty"
:
v
.
qty
,
"sequence"
:
1
,
"planned_start_time"
:
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
),
...
...
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