工单展示组件

This commit is contained in:
gqh
2023-03-21 13:58:46 +08:00
parent 00fdf38cc7
commit 9807f515e9
5 changed files with 12 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ csv_internal_sep = ,
data_dir = /var/lib/odoo
db_host = 172.17.0.2
db_maxconn = 64
db_name = sf16_cs_new
;db_name = sf16_cs_new
db_password = sf
db_port = 5432
db_sslmode = prefer

View File

@@ -12,7 +12,7 @@
'website': 'https://www.sf.jikimo.com',
'depends': ['mrp', 'base', 'sf_manufacturing','web_widget_model_viewer'],
'data': [
'data/product_data.xml',
# 'data/product_data.xml',
'views/product_template_view.xml',
'views/product_workorder.xml'
],

View File

@@ -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):

View File

@@ -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

View File

@@ -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">