From 9660392495aaa4209fd57ced968cfa406ef521fb Mon Sep 17 00:00:00 2001 From: guanhuan Date: Mon, 6 Jan 2025 14:52:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8A=A5=E5=BA=9F=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=94=9F=E6=88=90=E8=B0=83=E6=8B=A8=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index af0f0aa9..f065f562 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1378,9 +1378,9 @@ class MrpProduction(models.Model): move = self.env['stock.move'].search([('origin', '=', productions.name)], order='id desc') for mo in move: domain = [] - if mo.location_id.barcode == 'WH-POSTPRODUCTION' and mo.rule_id.picking_type_id.barcode == 'PC': + if mo.location_id.barcode == 'PL' and mo.rule_id.picking_type_id.sequence_code == 'PC': domain = [('barcode', '=', 'WH-PC'), ('sequence_code', '=', 'PC')] - elif mo.location_id.barcode == 'PL' and mo.rule_id.picking_type_id.barcode == 'INT': + elif mo.location_id.barcode == 'WH-INPUT' and mo.rule_id.picking_type_id.sequence_code == 'INT': domain = [('barcode', '=', 'WH-INTERNAL'), ('sequence_code', '=', 'INT')] if domain: picking_type = self.env['stock.picking.type'].search(domain) @@ -1540,7 +1540,7 @@ class MrpProduction(models.Model): @api.depends('procurement_group_id', 'procurement_group_id.stock_move_ids.group_id') def _compute_picking_ids(self): for order in self: - if order.product_id.product_tmpl_id.single_manufacturing == True: + if order.product_id.product_tmpl_id.single_manufacturing == True and not order.is_remanufacture: first_order = self.env['mrp.production'].search( [('origin', '=', order.origin), ('product_id', '=', order.product_id.id)], limit=1, order='id asc') order.picking_ids = self.env['stock.picking'].search([