From 83e57b63ec2e50c5dad4bdca7b365b493eb5197d Mon Sep 17 00:00:00 2001 From: guanhuan Date: Tue, 10 Dec 2024 17:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=BA=9F=E6=96=B0=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E5=88=B6=E9=80=A0=E8=AE=A2=E5=8D=95=E6=B2=A1=E5=85=B3?= =?UTF-8?q?=E8=81=94=E6=96=B0=E9=87=87=E8=B4=AD=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index f11a32ac..77b23e0a 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1495,7 +1495,9 @@ class MrpProduction(models.Model): def action_view_purchase_orders(self): self.ensure_one() - if self.product_id.product_tmpl_id.single_manufacturing == True: + if self.is_remanufacture: + production = self + elif self.product_id.product_tmpl_id.single_manufacturing == True: production = self.env['mrp.production'].search( [('origin', '=', self.origin), ('product_id', '=', self.product_id.id)], limit=1, order='id asc') else: