修复表面工艺

This commit is contained in:
jinling.yang
2024-07-01 10:47:05 +08:00
parent e1db34f25d
commit 4c66d86ee6
2 changed files with 19 additions and 21 deletions

View File

@@ -862,10 +862,9 @@ class ResMrpWorkOrder(models.Model):
('location_dest_id', '=', self.env['stock.location'].search(
[('barcode', 'ilike', 'VL-SPOC')]).id),
('origin', '=', self.production_id.name)])
purchase = self.env['purchase.order'].search([('origin', 'ilike', self.production_id.name)])
if purchase and move_out:
if move_out:
move_out.write({'state': 'assigned'})
self.env['stock.move.line'].create(move_out.get_move_line(purchase, self))
self.env['stock.move.line'].create(move_out.get_move_line(self.production_id, self))
# move_out._action_assign()
if self.state == 'waiting' or self.state == 'ready' or self.state == 'progress':