From 38e1bf757d6bc28d94e10065741a8a84cead0357 Mon Sep 17 00:00:00 2001 From: Thierry Ducrest Date: Wed, 6 Nov 2024 09:18:50 +0100 Subject: [PATCH] fixup! fixup! Add purchase_propagate_qty_mrp --- purchase_propagate_qty_mrp/__manifest__.py | 1 + purchase_propagate_qty_mrp/models/purchase_order_line.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/purchase_propagate_qty_mrp/__manifest__.py b/purchase_propagate_qty_mrp/__manifest__.py index 14ae8a3db84..cd1ac4033c0 100644 --- a/purchase_propagate_qty_mrp/__manifest__.py +++ b/purchase_propagate_qty_mrp/__manifest__.py @@ -7,6 +7,7 @@ "summary": "", "author": "Camptocamp, Odoo Community Association (OCA)", "website": "https://github.com/OCA/purchase-workflow", + "maintainers": ["TDu"], "category": "Purchase Management", "license": "AGPL-3", "depends": ["purchase_propagate_qty", "mrp"], diff --git a/purchase_propagate_qty_mrp/models/purchase_order_line.py b/purchase_propagate_qty_mrp/models/purchase_order_line.py index b0488539da2..f9b0b894a15 100644 --- a/purchase_propagate_qty_mrp/models/purchase_order_line.py +++ b/purchase_propagate_qty_mrp/models/purchase_order_line.py @@ -32,6 +32,12 @@ def _propagate_qty_to_moves_mrp(self): ): relevant_bom = bom break + if not relevant_bom: + relevant_bom = ( + self.env["mrp.bom"] + .sudo() + ._bom_find(product=self.product_id, bom_type="phantom") + ) if not relevant_bom: return None new_kit_quantity = self.product_uom_qty