diff --git a/sf_dlm/__manifest__.py b/sf_dlm/__manifest__.py index da6dba4b..098a2cdd 100644 --- a/sf_dlm/__manifest__.py +++ b/sf_dlm/__manifest__.py @@ -13,7 +13,8 @@ 'depends': ['mrp', 'base', 'sf_manufacturing'], 'data': [ 'data/product_data.xml', - 'views/product_template_view.xml' + 'views/product_template_view.xml', + 'views/product_workorder.xml' ], 'demo': [ ], diff --git a/sf_dlm/models/__init__.py b/sf_dlm/models/__init__.py index 7d40ff65..c6b96570 100644 --- a/sf_dlm/models/__init__.py +++ b/sf_dlm/models/__init__.py @@ -1,5 +1,6 @@ from. import product_template from. import product_supplierinfo +from. import product_workorder diff --git a/sf_dlm/models/product_workorder.py b/sf_dlm/models/product_workorder.py new file mode 100644 index 00000000..eafa3175 --- /dev/null +++ b/sf_dlm/models/product_workorder.py @@ -0,0 +1,13 @@ +from odoo import api, fields, models + + + +class ResMrpWorkOrder(models.Model): + _inherit = 'mrp.workorder' + _order = 'sequence' + + product_tmpl_id_length = fields.Float(related='production_id.product_tmpl_id.length', readonly=True, store=True, check_company=True, string="胚料长度(mm)") + product_tmpl_id_width = fields.Float(related='production_id.product_tmpl_id.width', readonly=True, store=True, check_company=True, string="胚料宽度(mm)") + product_tmpl_id_height = fields.Float(related='production_id.product_tmpl_id.height', readonly=True, store=True, check_company=True, string="胚料高度(mm)") + product_tmpl_id_materials_id = fields.Many2one(related='production_id.product_tmpl_id.materials_id', readonly=True, store=True, check_company=True, string="材料") + product_tmpl_id_materials_type_id = fields.Many2one(related='production_id.product_tmpl_id.materials_type_id', readonly=True, store=True, check_company=True, string="型号") diff --git a/sf_dlm/views/product_workorder.xml b/sf_dlm/views/product_workorder.xml new file mode 100644 index 00000000..4c5f2a10 --- /dev/null +++ b/sf_dlm/views/product_workorder.xml @@ -0,0 +1,27 @@ + + + + production.workorder.dlm + mrp.workorder + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/sf_manufacturing/views/mrp_workcenter_views.xml b/sf_manufacturing/views/mrp_workcenter_views.xml index 85bf5f6c..0ba4034a 100644 --- a/sf_manufacturing/views/mrp_workcenter_views.xml +++ b/sf_manufacturing/views/mrp_workcenter_views.xml @@ -56,7 +56,7 @@ - 工作中心概述 + 工作中心看板 ir.actions.act_window mrp.workcenter kanban,form @@ -76,7 +76,7 @@ - + @@ -110,17 +110,26 @@ context="{'default_workcenter_id': workcenter_id}" class="btn-danger" attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked')]}"/> + + + 1 + + + + + + @@ -145,7 +154,6 @@ - @@ -159,12 +167,8 @@ - - - - - - + +
左面: