mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 17:15:04 +00:00
committed by
Mergify
parent
243b533150
commit
a5c49d1e08
@@ -120,7 +120,11 @@ class StockSettings(Document):
|
||||
)
|
||||
|
||||
def cant_change_valuation_method(self):
|
||||
previous_valuation_method = self.get_doc_before_save().get("valuation_method")
|
||||
doc_before_save = self.get_doc_before_save()
|
||||
if not doc_before_save:
|
||||
return
|
||||
|
||||
previous_valuation_method = doc_before_save.get("valuation_method")
|
||||
|
||||
if previous_valuation_method and previous_valuation_method != self.valuation_method:
|
||||
# check if there are any stock ledger entries against items
|
||||
|
||||
Reference in New Issue
Block a user