fix: prevent manual cancellation of the linked Revaluation Journal Entry

This commit is contained in:
Navin-S-R
2026-01-12 18:18:22 +05:30
parent 500c44e3f5
commit 73b038084b
2 changed files with 19 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ class AssetValueAdjustment(Document):
if revaluation_entry.docstatus == 1:
# Ignore permissions to match Journal Entry submission behavior
revaluation_entry.flags.ignore_permissions = True
revaluation_entry.flags.via_asset_value_adjustment = True
revaluation_entry.cancel()
def update_asset(self):