mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
fix onchange
This commit is contained in:
committed by
OCA-git-bot
parent
b1c24ee257
commit
dda83904e5
@@ -268,8 +268,7 @@ class AccountAsset(models.Model):
|
||||
raise UserError(
|
||||
_("The Start Date must precede the Ending Date."))
|
||||
|
||||
@api.onchange('purchase_value', 'salvage_value', 'date_start', 'method',
|
||||
'depreciation_line_ids.type')
|
||||
@api.onchange('purchase_value', 'salvage_value', 'date_start', 'method')
|
||||
def _onchange_purchase_salvage_value(self):
|
||||
if self.method in ['linear-limit', 'degr-limit']:
|
||||
self.depreciation_base = self.purchase_value or 0.0
|
||||
|
||||
Reference in New Issue
Block a user