From 1a10f0bcbd0d9d19e9267a0715b3a5e69c77f2c3 Mon Sep 17 00:00:00 2001 From: ljain112 Date: Mon, 10 Jun 2024 20:06:05 +0530 Subject: [PATCH] fix: regional overide for updating item valution --- erpnext/controllers/buying_controller.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index b7bee0852be8..cb39b5826a70 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -8,6 +8,7 @@ from frappe.utils import cint, flt, getdate from frappe.utils.data import nowtime +import erpnext from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget from erpnext.accounts.party import get_party_details from erpnext.buying.utils import update_last_purchase_rate, validate_for_items @@ -332,6 +333,8 @@ def update_valuation_rate(self, reset_outgoing_rate=True): else: item.valuation_rate = 0.0 + update_regional_item_valuation_rate(self) + def set_incoming_rate(self): if self.doctype not in ("Purchase Receipt", "Purchase Invoice", "Purchase Order"): return @@ -937,3 +940,8 @@ def validate_item_type(doc, fieldname, message): ).format(items, message) frappe.throw(error_message) + + +@erpnext.allow_regional +def update_regional_item_valuation_rate(doc): + pass