工单展示组件
This commit is contained in:
@@ -247,8 +247,8 @@ class MrpProduction(models.Model):
|
||||
current_sequence += 1
|
||||
if work.name == '获取CNC加工程序':
|
||||
work.button_start()
|
||||
#work.button_finish()
|
||||
work.fetchCNC()
|
||||
work.button_finish()
|
||||
#work.fetchCNC()
|
||||
|
||||
#创建工单并进行排序
|
||||
def _create_workorder(self):
|
||||
|
||||
@@ -153,7 +153,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
'date_planned_start': False,
|
||||
'date_planned_finished': False,
|
||||
'duration_expected': 60,
|
||||
'duration': 0
|
||||
'duration': 0,
|
||||
|
||||
}]
|
||||
return workorders_values_str
|
||||
|
||||
@@ -389,7 +390,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
'date_planned_start': False,
|
||||
'date_planned_finished': False,
|
||||
'duration_expected': 60,
|
||||
'duration': 0
|
||||
'duration': 0,
|
||||
|
||||
}]
|
||||
return workorders_values_str
|
||||
|
||||
@@ -399,6 +401,7 @@ class ResMrpWorkOrder(models.Model):
|
||||
if self.routing_type == '装夹':
|
||||
self.pro_code = self.production_id.move_raw_ids[0].move_line_ids[0].lot_id.name
|
||||
if self.state == 'waiting' or self.state == 'ready' or self.state == 'progress':
|
||||
self.move_raw_ids = self.production_id.move_raw_ids
|
||||
self.ensure_one()
|
||||
if any(not time.date_end for time in self.time_ids.filtered(lambda t: t.user_id.id == self.env.user.id)):
|
||||
return True
|
||||
|
||||
@@ -123,9 +123,9 @@
|
||||
attrs="{'invisible': ['|', '|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked'),('name','=','获取CNC加工程序')]}"/>
|
||||
</xpath>
|
||||
<!-- 隐藏物料清单-->
|
||||
<xpath expr="//page[@name='components']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<!-- <xpath expr="//page[@name='components']" position="attributes">-->
|
||||
<!-- <attribute name="invisible">1</attribute>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- 隐藏物料清单-->
|
||||
|
||||
<field name="production_id" position="after" invisible="0">
|
||||
|
||||
Reference in New Issue
Block a user