mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 03:09:09 +00:00
fix: Reload document on cancel to avoid document modified error
This commit is contained in:
@@ -152,6 +152,7 @@ class Asset(AccountsController):
|
|||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.validate_in_use_date()
|
self.validate_in_use_date()
|
||||||
self.make_asset_movement()
|
self.make_asset_movement()
|
||||||
|
self.reload()
|
||||||
if not self.booked_fixed_asset and self.validate_make_gl_entry():
|
if not self.booked_fixed_asset and self.validate_make_gl_entry():
|
||||||
self.make_gl_entries()
|
self.make_gl_entries()
|
||||||
if self.calculate_depreciation and not self.split_from:
|
if self.calculate_depreciation and not self.split_from:
|
||||||
@@ -163,6 +164,7 @@ class Asset(AccountsController):
|
|||||||
self.validate_cancellation()
|
self.validate_cancellation()
|
||||||
self.cancel_movement_entries()
|
self.cancel_movement_entries()
|
||||||
self.cancel_capitalization()
|
self.cancel_capitalization()
|
||||||
|
self.reload()
|
||||||
self.delete_depreciation_entries()
|
self.delete_depreciation_entries()
|
||||||
cancel_asset_depr_schedules(self)
|
cancel_asset_depr_schedules(self)
|
||||||
self.set_status()
|
self.set_status()
|
||||||
|
|||||||
Reference in New Issue
Block a user