判断外协工序是否连续有多个外协工序为同一个供应商(产品为表面工艺服务的供应商),

This commit is contained in:
jinling.yang
2023-04-14 17:54:20 +08:00
parent d80b4b6169
commit a5c707bf43
8 changed files with 89 additions and 59 deletions

View File

@@ -119,6 +119,7 @@ class MrsProductionProcessParameter(models.Model):
code = fields.Char("编码")
name = fields.Char('名称')
gain_way = fields.Selection([("自加工", "自加工"), ("外协", "外协")], default="", string="获取方式")
is_check = fields.Boolean(default=True)
# price = fields.Float('单价')
process_id = fields.Many2one('sf.production.process', string='表面工艺')
materials_model_ids = fields.Many2many('sf.materials.model', 'applicable_material', string='适用材料')
@@ -127,7 +128,7 @@ class MrsProductionProcessParameter(models.Model):
def name_get(self):
result = []
for parameter in self:
name = parameter.process_id.name + ',' + parameter.name
name = parameter.process_id.name + '-' + parameter.name
result.append((parameter.id, name))
return result