diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py index 9a2495ed484..a28b65bf907 100644 --- a/erpnext/buying/doctype/purchase_order/purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/purchase_order.py @@ -644,7 +644,7 @@ def make_rm_stock_entry(purchase_order, rm_items): } stock_entry.add_to_stock_entry_detail(items_dict) - stock_entry.set_missing_values() + stock_entry.set_missing_values(raise_error_if_no_rate=False) return stock_entry.as_dict() else: frappe.throw(_("No Items selected for transfer")) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 4711d039c36..4d96e544676 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -2229,11 +2229,11 @@ class StockEntry(StockController): return sorted(list(set(get_serial_nos(self.pro_doc.serial_no)) - set(used_serial_nos))) - def set_missing_values(self): + def set_missing_values(self, raise_error_if_no_rate=True): "Updates rate and availability of all the items of mapped doc." self.set_transfer_qty() self.set_actual_qty() - self.calculate_rate_and_amount() + self.calculate_rate_and_amount(raise_error_if_no_rate=raise_error_if_no_rate) @frappe.whitelist()