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
41f6af00
Commit
41f6af00
authored
Nov 22, 2024
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改问题
parent
86b27971
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
jzjx_project/models/inheirt_roke_repair_order.py
+1
-1
jzjx_project/models/inherit_roke_scrap_order.py
+1
-1
jzjx_project/models/inherit_roke_work_order.py
+6
-0
No files found.
jzjx_project/models/inheirt_roke_repair_order.py
View file @
41f6af00
...
...
@@ -13,7 +13,7 @@ class JzjxInheritRepairOrder(models.Model):
class
JzjxInheritRepairOrderLine
(
models
.
Model
):
_inherit
=
"roke.repair.order.line"
repair_work_order_id
=
fields
.
Many2one
(
"roke.work.order"
,
string
=
"返修工单"
,
ondelete
=
'
cascade
'
)
repair_work_order_id
=
fields
.
Many2one
(
"roke.work.order"
,
string
=
"返修工单"
,
ondelete
=
'
restrict
'
)
is_refix_auto_work_order
=
fields
.
Boolean
(
string
=
"是否自动生产返修单"
)
reason_id
=
fields
.
Many2one
(
"roke.scrap.reason"
,
string
=
"报废原因"
,
ondelete
=
'restrict'
)
jzjx_project/models/inherit_roke_scrap_order.py
View file @
41f6af00
...
...
@@ -13,5 +13,5 @@ class JzjxInheritScrapOrder(models.Model):
class
JzjxInheritScrapOrderLine
(
models
.
Model
):
_inherit
=
"roke.scrap.order.line"
scrap_work_order_ids
=
fields
.
Many2many
(
"roke.work.order"
,
string
=
"补件工单"
,
ondelete
=
'
cascade
'
)
scrap_work_order_ids
=
fields
.
Many2many
(
"roke.work.order"
,
string
=
"补件工单"
,
ondelete
=
'
restrict
'
)
is_rfe
=
fields
.
Boolean
(
string
=
"是否工单补件"
)
jzjx_project/models/inherit_roke_work_order.py
View file @
41f6af00
...
...
@@ -94,6 +94,12 @@ class InheritWorkOrder(models.Model):
class
InheritRokeWorkRecordModel
(
models
.
Model
):
_inherit
=
"roke.work.record"
def
withdraw_repair_scrap
(
self
):
work_order
=
self
.
work_order_id
if
not
work_order
.
task_id
and
not
work_order
.
record_ids
and
work_order
.
type
==
"生产"
:
# 无生产任务且当前工单下无其它报工记录时时,撤回直接删除工单
work_order
.
unlink
()
def
withdraw
(
self
):
"""
撤回报工
...
...
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