1、功能刀具拆解单优化;2、完成 需求坯料序列号生成规则优化2;

This commit is contained in:
yuxianghui
2024-06-19 11:19:47 +08:00
parent 4497fb04c1
commit 6dae144d76
6 changed files with 49 additions and 17 deletions

View File

@@ -854,10 +854,10 @@ class ProductProduct(models.Model):
'company_id': self.env.company.id
})
# 获取位置对象
location_inventory_id = self.env['stock.location'].search([('name', '=', 'Production')])
location_inventory_ids = self.env['stock.location'].search([('name', 'in', ('Production', '生产'))])
stock_location_id = self.env['stock.location'].search([('name', '=', '组装后')])
# 创建功能刀具该批次/序列号 库存移动和移动历史
stock_lot.create_stock_quant(location_inventory_id, stock_location_id, functional_tool_assembly.id,
stock_lot.create_stock_quant(location_inventory_ids[-1], stock_location_id, functional_tool_assembly.id,
obj.assembly_order_code, obj, obj.after_tool_groups_id)
return stock_lot