Skip to content

Commit

Permalink
[FIX] _cost_mrp: bom when variant is inactive
Browse files Browse the repository at this point in the history
closes #607

Signed-off-by: Juan José Scarafía <jjs@adhoc.com.ar>
  • Loading branch information
jcadhoc committed Mar 15, 2024
1 parent fba48b0 commit 194af59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion product_replenishment_cost_mrp/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def _compute_replenishment_cost(self):

# robamos metodo de calculo de costo de product_extended
price = 0.0
bom = self.env['mrp.bom']._bom_find(rec.product_variant_ids[0])[rec.product_variant_ids[0]]
bom = self.env['mrp.bom']._bom_find(rec.with_context(active_test=False).product_variant_ids[0])[rec.with_context(active_test=False).product_variant_ids[0]]
if not bom:
rec.update({
'replenishment_base_cost_on_currency': 0.0,
Expand Down

0 comments on commit 194af59

Please sign in to comment.