1、优化功能刀具序列号

This commit is contained in:
yuxianghui
2024-06-12 10:24:16 +08:00
parent 469839f38e
commit 42cded8c64
3 changed files with 4 additions and 4 deletions

View File

@@ -824,7 +824,7 @@ class ProductProduct(models.Model):
logging.info('没有搜索到功能刀具产品:%s' % product_id)
raise ValidationError('没有找到按唯一序列号追溯的功能刀具产品信息!')
stock_lot = self.env['stock.lot'].create({
'name': self.get_stock_lot_name(tool_assembly_order_id),
'name': self.get_stock_lot_name(obj),
'product_id': product_id[0].id,
'company_id': self.env.company.id
})
@@ -851,7 +851,7 @@ class ProductProduct(models.Model):
else:
m = int(stock_lot_id.name[-3:]) + 1
num = "%03d" % m
return code + str(num)
return '%s-%s' % (code, num)
def tool_material_stock_moves(self, tool_material, assembly_order_code):
"""