表面工艺类别拖动排序

This commit is contained in:
jinling.yang
2023-03-29 17:48:03 +08:00
parent 93c9287717
commit 20d9e469f5
7 changed files with 147 additions and 99 deletions

View File

@@ -45,6 +45,7 @@ class MrsProductionProcessCategory(models.Model):
name = fields.Char('名称')
code = fields.Char("编码")
sequence = fields.Integer('排序')
production_process_ids = fields.One2many('sf.production.process', 'category_id', string="表面工艺")
active = fields.Boolean('有效', default=True)
@@ -61,9 +62,8 @@ class MrsProductionProcess(models.Model):
partner_process_ids = fields.Many2many('res.partner', 'process_ids', '加工工厂')
active = fields.Boolean('有效', default=True)
parameter_ids = fields.One2many('sf.production.process.parameter', 'process_id', string='可选参数')
gain_way = fields.Selection([("自加工", "自加工"), ("外协", "外协")], default="", string="获取方式")
category_id = fields.Many2one('sf.production.process.category')
workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_process', required=True)
# workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_process', required=True)
@@ -112,12 +112,15 @@ class SupplierSort(models.Model):
('supplier_sort_uniq', 'unique (partner_id,materials_model_id)', '排序不能重复!')
]
class MrsProductionProcessParameter(models.Model):
_name = 'sf.production.process.parameter'
_description = '可选参数'
name = fields.Char('参数名')
active = fields.Boolean('有效', default=True)
price = fields.Float('单价')
code = fields.Char("编码")
name = fields.Char('名称')
gain_way = fields.Selection([("自加工", "自加工"), ("外协", "外协")], default="", string="获取方式")
# price = fields.Float('单价')
process_id = fields.Many2one('sf.production.process', string='表面工艺')
materials_model_ids = fields.Many2many('sf.materials.model', 'applicable_material', string='适用材料')
code = fields.Char("编码")
active = fields.Boolean('有效', default=True)