sf的销售订单生成制造订单的方法,该方法内,需让制造订单和工单的数据入数据库,以便生成表面外协工艺相关的外协出入库单及关联的库存(stock.move)记录的代码可转移至生成工单的该行代码production.workorder_ids = workorders_values前后左右

This commit is contained in:
jinling.yang
2023-04-19 18:05:41 +08:00
parent 5a639d6f55
commit 4e2947c107
5 changed files with 122 additions and 27 deletions

View File

@@ -65,6 +65,7 @@ class MrsProductionProcess(models.Model):
category_id = fields.Many2one('sf.production.process.category')
# workcenter_ids = fields.Many2many('mrp.workcenter', 'rel_workcenter_process', required=True)
class MrsProcessingTechnology(models.Model):
_name = 'sf.processing.technology'
_description = '加工工艺'
@@ -128,8 +129,9 @@ class MrsProductionProcessParameter(models.Model):
def name_get(self):
result = []
for parameter in self:
name = parameter.process_id.name + '-' + parameter.name
result.append((parameter.id, name))
if parameter.process_id:
name = parameter.process_id.name + '-' + parameter.name
result.append((parameter.id, name))
return result
# 获取表面工艺的获取方式