diff --git a/erpnext/controllers/stock_controller.py b/erpnext/controllers/stock_controller.py index e0031c9c69..11ac703311 100644 --- a/erpnext/controllers/stock_controller.py +++ b/erpnext/controllers/stock_controller.py @@ -406,7 +406,8 @@ class StockController(AccountsController): def set_rate_of_stock_uom(self): if self.doctype in ["Purchase Receipt", "Purchase Invoice", "Purchase Order", "Sales Invoice", "Sales Order", "Delivery Note", "Quotation"]: for d in self.get("items"): - d.stock_uom_rate = d.rate / d.conversion_factor + if d.conversion_factor: + d.stock_uom_rate = d.rate / d.conversion_factor def validate_internal_transfer(self): if self.doctype in ('Sales Invoice', 'Delivery Note', 'Purchase Invoice', 'Purchase Receipt') \