mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
fix: stock settings save issue
This commit is contained in:
@@ -121,7 +121,11 @@ class StockSettings(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def cant_change_valuation_method(self):
|
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:
|
if previous_valuation_method and previous_valuation_method != self.valuation_method:
|
||||||
# check if there are any stock ledger entries against items
|
# check if there are any stock ledger entries against items
|
||||||
|
|||||||
Reference in New Issue
Block a user