修改工单开始

This commit is contained in:
胡尧
2024-11-27 08:37:12 +08:00
parent 087bb0e8fe
commit 64fdedf726
3 changed files with 15 additions and 9 deletions

View File

@@ -388,6 +388,7 @@ class StockRule(models.Model):
i,
process_parameter))
productions.technology_design_ids = technology_design_values
productions.write({'state': 'technology_to_confirmed'})
return True
@@ -965,7 +966,7 @@ class ReStockMove(models.Model):
合并制造订单的完成move单据
"""
res = super(ReStockMove, self)._merge_moves_fields()
if self[0].origin and self.picking_type_id.name in ['生产发料', '内部调拨']:
if self[0].origin and self.picking_type_id.name in ['生产发料', '内部调拨', '生产入库']:
production = self.env['mrp.production'].search([('name', '=', self[0].origin)], limit=1, order='id asc')
productions = self.env['mrp.production'].search(
[('origin', '=', production.origin), ('product_id', '=', production.product_id.id)])