Skip to content

Commit

Permalink
[FIX]product_replenishment_cost_mrp:quick fix v15
Browse files Browse the repository at this point in the history
closes #615

Signed-off-by: Bruno Zanotti <bz@adhoc.com.ar>
  • Loading branch information
jcadhoc committed May 6, 2024
1 parent 88a08f5 commit f698643
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _get_bom_lines(self, bom, bom_quantity, product, line_id, level):

def _get_price(self, bom, factor, product):
price = 0
if bom.routing_id:
if bom.operation_ids:
# routing are defined on a BoM and don't have a concept of quantity.
# It means that the operation time are defined for the quantity on
# the BoM (the user produces a batch of products). E.g the user
Expand All @@ -58,7 +58,7 @@ def _get_price(self, bom, factor, product):
operation_cycle = float_round(
factor, precision_rounding=1, rounding_method='UP')
operations = self._get_operation_line(
bom.routing_id, operation_cycle, 0)
bom.operation_ids, operation_cycle, 0)
price += sum([op['total'] for op in operations])

for line in bom.bom_line_ids:
Expand Down

0 comments on commit f698643

Please sign in to comment.