mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
fix: ensure cache is cleared on fiscal year update and trash
(cherry picked from commit 39b0e3522a)
This commit is contained in:
@@ -33,6 +33,12 @@ class FiscalYear(Document):
|
|||||||
self.validate_dates()
|
self.validate_dates()
|
||||||
self.validate_overlap()
|
self.validate_overlap()
|
||||||
|
|
||||||
|
def on_update(self):
|
||||||
|
frappe.cache().delete_key("fiscal_years")
|
||||||
|
|
||||||
|
def on_trash(self):
|
||||||
|
frappe.cache().delete_key("fiscal_years")
|
||||||
|
|
||||||
def validate_dates(self):
|
def validate_dates(self):
|
||||||
self.validate_from_to_dates("year_start_date", "year_end_date")
|
self.validate_from_to_dates("year_start_date", "year_end_date")
|
||||||
if self.is_short_year:
|
if self.is_short_year:
|
||||||
|
|||||||
Reference in New Issue
Block a user