From 33205c5d2978ce3b120d3419fa18f4f67ab558c3 Mon Sep 17 00:00:00 2001 From: guanhuan Date: Tue, 17 Jun 2025 10:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=90=8C=E4=BA=A7=E5=93=81=E8=B0=83?= =?UTF-8?q?=E6=8B=A8=E5=8D=95=E5=B0=B1=E7=BB=AA=E6=9C=AA=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_demand_plan/models/sf_production_demand_plan.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sf_demand_plan/models/sf_production_demand_plan.py b/sf_demand_plan/models/sf_production_demand_plan.py index 4eb8d449..c0121d58 100644 --- a/sf_demand_plan/models/sf_production_demand_plan.py +++ b/sf_demand_plan/models/sf_production_demand_plan.py @@ -501,7 +501,10 @@ class SfProductionDemandPlan(models.Model): action = self.env["ir.actions.actions"]._for_xml_id("stock.action_picking_tree_all") picking_ids = None if self.supply_method in ('automation', 'manual'): - picking_ids = self.sale_order_id.mrp_production_ids.mapped('picking_ids').filtered( + mrp_production_ids = self.sale_order_id.mrp_production_ids.filtered( + lambda p: p.product_id.id == self.product_id.id + ) + picking_ids = mrp_production_ids.mapped('picking_ids').filtered( lambda p: p.state == 'assigned') elif self.supply_method in ('purchase', 'outsourcing'): picking_ids = self.sale_order_id.picking_ids.filtered(