Skip to content

Commit

Permalink
[15.0][3733][FIX] mrp_production_force_bom: fix raising error when qt…
Browse files Browse the repository at this point in the history
…y of BOM is greater than 1 #78
  • Loading branch information
AungKoKoLin1997 authored Jan 19, 2024
1 parent 83d7ef0 commit 1415334
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mrp_production_force_bom/models/mrp_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ def _skip_bom_check(self):

def _check_component_discrepancies(self, error_messages):
# Get all the components and their quantities using explode()
_, lines_done = self.bom_id.explode(self.product_id, self.product_qty)
factor = (
self.product_uom_id._compute_quantity(
self.product_qty, self.bom_id.product_uom_id
)
/ self.bom_id.product_qty
)
_, lines_done = self.bom_id.explode(self.product_id, factor)
expected_components = {}
for line, data in lines_done:
product_id = line.product_id.id
Expand Down

0 comments on commit 1415334

Please sign in to comment.