Skip to content

Commit 56074d3

Browse files
committed
[FIX]product_replenishment_cost_mrp: change ratio to factor
closes #863 Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
1 parent 347b4c9 commit 56074d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

product_replenishment_cost_mrp/models/product_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ def _compute_replenishment_cost(self):
7575
seller = rec.seller_ids.filtered(lambda s: s.partner_id in bom.subcontractor_ids)[:1]
7676

7777
if seller:
78-
if bom.product_uom_id.ratio == 0:
78+
if not bom.product_uom_id.factor:
7979
raise ValueError(
8080
_(
81-
"El ratio de la unidad de medida del producto '%s' en el BOM es cero. "
81+
"El factor de la unidad de medida del producto '%s' en el BOM no esta seteado. "
8282
"Esto provocaría una división por cero. Verifique la configuración de la UoM."
8383
)
8484
% bom.display_name
8585
)
8686
# Calculate the subcontracting cost
87-
ratio_uom_seller = seller.product_uom.ratio / bom.product_uom_id.ratio
87+
ratio_uom_seller = seller.product_uom.factor / bom.product_uom_id.factor
8888
subcontract_price = seller.currency_id._convert(
8989
seller.price, product_currency, company, date, round=False
9090
)

0 commit comments

Comments
 (0)