From fe511f18e165e0e49c552a15b0e6a28308e31a51 Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Mon, 30 May 2016 16:13:11 +0200 Subject: [PATCH] [FIX] account_asset: don't recompute depreciation board on state change When a user goes through the trouble of manually modifying the depreciation lines he will lose all his work when clicking on 'reset to draft'. Furthermore, if he then goes through the trouble of repairing the problem by once again manually changing the depreciation lines he will again lose his work when pressing confirm. opw-678678 --- addons/account_asset/account_asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 96667d2ccf8..1abcb28a5bf 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -358,7 +358,7 @@ class AccountAssetAsset(models.Model): @api.multi def write(self, vals): res = super(AccountAssetAsset, self).write(vals) - if 'depreciation_line_ids' not in vals: + if 'depreciation_line_ids' not in vals and 'state' not in vals: self.compute_depreciation_board() return res