[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
This commit is contained in:
Lucas Perais (lpe)
2018-08-01 14:16:21 +02:00
parent e372ca5cd8
commit 17e50b745d
@@ -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):