还原代码

This commit is contained in:
jinling.yang
2024-09-18 17:59:08 +08:00
parent 43f53197c4
commit 190d6da217
5 changed files with 63 additions and 63 deletions

View File

@@ -806,10 +806,10 @@ class MrpProduction(models.Model):
backorders = backorders - productions_to_backorder
productions_not_to_backorder._post_inventory(cancel_backorder=True)
if self.workorder_ids.filtered(lambda w: w.routing_type in ['表面工艺']):
move_finish = self.env['stock.move'].search([('created_production_id', '=', self.id)])
if move_finish:
move_finish._action_assign()
# if self.workorder_ids.filtered(lambda w: w.routing_type in ['表面工艺']):
# move_finish = self.env['stock.move'].search([('created_production_id', '=', self.id)])
# if move_finish:
# move_finish._action_assign()
productions_to_backorder._post_inventory(cancel_backorder=True)
# if completed products make other confirmed/partially_available moves available, assign them