增加成品工序模板(人工线下加工)
This commit is contained in:
@@ -8,17 +8,20 @@ class ModelType(models.Model):
|
|||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
embryo_tolerance = fields.Integer('坯料容余')
|
embryo_tolerance = fields.Integer('坯料容余')
|
||||||
product_routing_tmpl_ids = fields.One2many('sf.product.model.type.routing.sort', 'product_model_type_id',
|
product_routing_tmpl_ids = fields.One2many('sf.product.model.type.routing.sort', 'product_model_type_id',
|
||||||
'成品工序模板')
|
'成品工序模板(自动化产线加工')
|
||||||
embryo_routing_tmpl_ids = fields.One2many('sf.embryo.model.type.routing.sort', 'embryo_model_type_id',
|
embryo_routing_tmpl_ids = fields.One2many('sf.embryo.model.type.routing.sort', 'embryo_model_type_id',
|
||||||
'坯料工序模板')
|
'坯料工序模板')
|
||||||
surface_technics_routing_tmpl_ids = fields.One2many('sf.surface_technics.model.type.routing.sort',
|
surface_technics_routing_tmpl_ids = fields.One2many('sf.surface_technics.model.type.routing.sort',
|
||||||
'surface_technics_model_type_id',
|
'surface_technics_model_type_id',
|
||||||
'表面工艺工序模板')
|
'表面工艺工序模板')
|
||||||
|
manual_product_routing_tmpl_ids = fields.One2many('sf.manual.product.model.type.routing.sort',
|
||||||
|
'manual_product_model_type_id',
|
||||||
|
'成品工序模板(人工线下加工)')
|
||||||
|
|
||||||
|
|
||||||
class ProductModelTypeRoutingSort(models.Model):
|
class ProductModelTypeRoutingSort(models.Model):
|
||||||
_name = 'sf.product.model.type.routing.sort'
|
_name = 'sf.product.model.type.routing.sort'
|
||||||
_description = '成品工序排序'
|
_description = '成品工序排序(自动化产线加工)'
|
||||||
|
|
||||||
sequence = fields.Integer('Sequence')
|
sequence = fields.Integer('Sequence')
|
||||||
route_workcenter_id = fields.Many2one('mrp.routing.workcenter',
|
route_workcenter_id = fields.Many2one('mrp.routing.workcenter',
|
||||||
@@ -65,3 +68,19 @@ class SurfaceTechnicsModelTypeRoutingSort(models.Model):
|
|||||||
'route_model_type_uniq', 'unique (route_workcenter_id,surface_technics_model_type_id)',
|
'route_model_type_uniq', 'unique (route_workcenter_id,surface_technics_model_type_id)',
|
||||||
'表面工艺工序不能重复!')
|
'表面工艺工序不能重复!')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class ManualProductModelTypeRoutingSort(models.Model):
|
||||||
|
_name = 'sf.manual.product.model.type.routing.sort'
|
||||||
|
_description = '成品工序排序(人工线下加工)'
|
||||||
|
|
||||||
|
sequence = fields.Integer('Sequence')
|
||||||
|
route_workcenter_id = fields.Many2one('mrp.routing.workcenter',
|
||||||
|
domain=[('routing_type', 'in', ['装夹预调', 'CNC加工', '解除装夹'])])
|
||||||
|
is_repeat = fields.Boolean('重复', related='route_workcenter_id.is_repeat')
|
||||||
|
routing_type = fields.Selection(string="工序类型", related='route_workcenter_id.routing_type')
|
||||||
|
workcenter_ids = fields.Many2many('mrp.workcenter', required=False, related='route_workcenter_id.workcenter_ids')
|
||||||
|
manual_product_model_type_id = fields.Many2one('sf.model.type')
|
||||||
|
|
||||||
|
_sql_constraints = [
|
||||||
|
('route_model_type_uniq', 'unique (route_workcenter_id,manual_product_model_type_id)', '成品工序不能重复!')
|
||||||
|
]
|
||||||
@@ -172,5 +172,6 @@ access_sf_production_technology_wizard_group_plan_dispatch,sf_production_technol
|
|||||||
access_sf_production_technology_wizard_group_sf_mrp_manager,sf_production_technology_wizard_group_sf_mrp_manager,model_sf_production_technology_wizard,sf_base.group_sf_mrp_manager,1,1,1,0
|
access_sf_production_technology_wizard_group_sf_mrp_manager,sf_production_technology_wizard_group_sf_mrp_manager,model_sf_production_technology_wizard,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||||
access_sf_production_technology_wizard_group_production_engineer,sf_production_technology_wizard_group_production_engineer,model_sf_production_technology_wizard,sf_base.group_production_engineer,1,1,1,0
|
access_sf_production_technology_wizard_group_production_engineer,sf_production_technology_wizard_group_production_engineer,model_sf_production_technology_wizard,sf_base.group_production_engineer,1,1,1,0
|
||||||
|
|
||||||
|
access_sf_manual_product_model_type_routing_sort_group_sf_mrp_user,sf_manual_product_model_type_routing_sort,model_sf_manual_product_model_type_routing_sort,sf_base.group_sf_mrp_user,1,0,0,0
|
||||||
|
access_sf_manual_product_model_type_routing_sort_manager,sf_manual_product_model_type_routing_sort,model_sf_manual_product_model_type_routing_sort,sf_base.group_sf_mrp_manager,1,1,1,0
|
||||||
|
access_sf_manual_product_model_type_routing_sort_group_plan_dispatch,sf_manual_product_model_type_routing_sort_group_plan_dispatch,model_sf_manual_product_model_type_routing_sort,sf_base.group_plan_dispatch,1,0,0,0
|
||||||
|
|||||||
|
@@ -44,6 +44,17 @@
|
|||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</group>
|
</group>
|
||||||
|
<group>
|
||||||
|
<field name='manual_product_routing_tmpl_ids'>
|
||||||
|
<tree editable='bottom'>
|
||||||
|
<field name="sequence" widget="handle" string="序号"/>
|
||||||
|
<field name="route_workcenter_id" string="工序" options="{'no_create': True}"/>
|
||||||
|
<field name="routing_type" string="类型"/>
|
||||||
|
<field name="is_repeat" string="重复"/>
|
||||||
|
<field name="workcenter_ids" string="工作中心" widget="many2many_tags"/>
|
||||||
|
</tree>
|
||||||
|
</field>
|
||||||
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name='embryo_routing_tmpl_ids'>
|
<field name='embryo_routing_tmpl_ids'>
|
||||||
<tree editable='bottom'>
|
<tree editable='bottom'>
|
||||||
|
|||||||
Reference in New Issue
Block a user