From 17e50b745d15a668959de2b6416e7301a104f6bf Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Tue, 31 Jul 2018 16:05:04 +0200 Subject: [PATCH] [FIX] account_assets: fallback sell or dispose button Create an asset and confirm it. Click on Sell or Dispose The form view of the disposal move opens With the breadcrums, back to the asset Click again on sell or dispose Before this commit, literally nothing happens This is because there is no more business to do After this commit, in the case there is no business to do we fallback onto the smartbutton's action OPW 1864318 closes #26086 --- addons/account_asset/models/account_asset.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/account_asset/models/account_asset.py b/addons/account_asset/models/account_asset.py index fe263cf608b..afafa0e9c1f 100644 --- a/addons/account_asset/models/account_asset.py +++ b/addons/account_asset/models/account_asset.py @@ -333,6 +333,8 @@ class AccountAssetAsset(models.Model): 'target': 'current', 'res_id': move_ids[0], } + # Fallback, as if we just clicked on the smartbutton + return self.open_entries() @api.multi def set_to_draft(self):