Accept Merge Request #1099: (feature/制造订单列表页及详情页优化需求 -> develop)
Merge Request: 制造订单列表页及详情页优化需求 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1099?initial=true
This commit is contained in:
@@ -30,12 +30,12 @@ class MrpProduction(models.Model):
|
|||||||
# ('completed', '已完工')
|
# ('completed', '已完工')
|
||||||
# ])
|
# ])
|
||||||
state = fields.Selection([
|
state = fields.Selection([
|
||||||
('draft', 'Draft'),
|
('draft', '待排程'),
|
||||||
('confirmed', 'Confirmed'),
|
('confirmed', '待加工'),
|
||||||
('progress', '待排程'),
|
('progress', '加工中'),
|
||||||
('pending_cam', '待装夹'),
|
# ('pending_cam', '待装夹'),
|
||||||
('pending_processing', '待加工'),
|
# ('pending_processing', '待加工'),
|
||||||
('pending_era_cam', '待解除装夹'),
|
# ('pending_era_cam', '待解除装夹'),
|
||||||
('completed', '已完工'),
|
('completed', '已完工'),
|
||||||
('to_close', 'To Close'),
|
('to_close', 'To Close'),
|
||||||
('done', 'Done'),
|
('done', 'Done'),
|
||||||
@@ -113,18 +113,36 @@ class MrpProduction(models.Model):
|
|||||||
production.state = 'progress'
|
production.state = 'progress'
|
||||||
|
|
||||||
# 新添加的状态逻辑
|
# 新添加的状态逻辑
|
||||||
if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待装夹':
|
if production.state == 'to_close' and production.schedule_state == '未排':
|
||||||
# production.state = 'pending_processing'
|
production.state = 'draft'
|
||||||
production.state = 'pending_cam'
|
elif production.state == 'to_close' and production.schedule_state == '已排':
|
||||||
if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待加工':
|
production.state = 'confirmed'
|
||||||
# if production.state == 'pending_cam' and production.process_state == '待加工':
|
# if production.schedule_state == '已完成':
|
||||||
production.state = 'pending_processing'
|
# production.state = 'completed'
|
||||||
elif production.state == 'progress' and production.process_state == '待解除装夹':
|
elif any(wo_state in ('progress', 'done') for wo_state in production.workorder_ids.mapped('state')):
|
||||||
production.state = 'pending_era_cam'
|
production.state = 'progress'
|
||||||
elif production.state == 'progress' and production.process_state == '已完工':
|
elif production.product_uom_id and not float_is_zero(production.qty_producing,
|
||||||
production.state = 'completed'
|
precision_rounding=production.product_uom_id.rounding):
|
||||||
elif production.state == 'progress' and production.work_order_state == '已完成':
|
production.state = 'progress'
|
||||||
production.state = 'completed'
|
elif any(not float_is_zero(move.quantity_done,
|
||||||
|
precision_rounding=move.product_uom.rounding or move.product_id.uom_id.rounding)
|
||||||
|
for move in production.move_raw_ids):
|
||||||
|
production.state = 'progress'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待装夹':
|
||||||
|
# # production.state = 'pending_processing'
|
||||||
|
# production.state = 'pending_cam'
|
||||||
|
# if production.state == 'progress' and production.schedule_state == '已排' and production.process_state == '待加工':
|
||||||
|
# # if production.state == 'pending_cam' and production.process_state == '待加工':
|
||||||
|
# production.state = 'pending_processing'
|
||||||
|
# elif production.state == 'progress' and production.process_state == '待解除装夹':
|
||||||
|
# production.state = 'pending_era_cam'
|
||||||
|
# elif production.state == 'progress' and production.process_state == '已完工':
|
||||||
|
# production.state = 'completed'
|
||||||
|
# elif production.state == 'progress' and production.work_order_state == '已完成':
|
||||||
|
# production.state = 'completed'
|
||||||
|
|
||||||
def action_check(self):
|
def action_check(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<!-- <attribute name="statusbar_visible">draft,confirmed,progress,pending_processing,completed,done -->
|
<!-- <attribute name="statusbar_visible">draft,confirmed,progress,pending_processing,completed,done -->
|
||||||
<!-- </attribute> -->
|
<!-- </attribute> -->
|
||||||
<attribute name="statusbar_visible">
|
<attribute name="statusbar_visible">
|
||||||
progress,pending_cam,pending_processing,pending_era_cam,completed,done
|
draft,confirmed,progress,completed,done
|
||||||
</attribute>
|
</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//sheet//group//group[2]//label" position="before">
|
<xpath expr="//sheet//group//group[2]//label" position="before">
|
||||||
|
|||||||
@@ -114488,10 +114488,21 @@ msgid "径跳精度(mm)"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: sf_manufacturing
|
#. module: sf_manufacturing
|
||||||
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__state__progress
|
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__state__draft
|
||||||
msgid "待排程"
|
msgid "待排程"
|
||||||
msgstr "待排程"
|
msgstr "待排程"
|
||||||
|
|
||||||
|
#. module: sf_manufacturing
|
||||||
|
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__process_state__待加工
|
||||||
|
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__state__confirmed
|
||||||
|
msgid "待加工"
|
||||||
|
msgstr "待加工"
|
||||||
|
|
||||||
|
#. module: sf_manufacturing
|
||||||
|
#: model:ir.model.fields.selection,name:sf_manufacturing.selection__mrp_production__state__progress
|
||||||
|
msgid "待排程"
|
||||||
|
msgstr "加工中"
|
||||||
|
|
||||||
#. module: sf_base
|
#. module: sf_base
|
||||||
#: model:ir.model.fields,field_description:sf_base.field_sf_cutting_tool_model__jump_accuracy
|
#: model:ir.model.fields,field_description:sf_base.field_sf_cutting_tool_model__jump_accuracy
|
||||||
msgid "径跳精度(um)"
|
msgid "径跳精度(um)"
|
||||||
|
|||||||
Reference in New Issue
Block a user