diff --git a/assets_management/models/account_move.py b/assets_management/models/account_move.py index 3ad1072210c8..ae7a41cd6e3e 100644 --- a/assets_management/models/account_move.py +++ b/assets_management/models/account_move.py @@ -74,9 +74,7 @@ def _compute_asset_data(self): ) def _compute_hide_link_asset_button(self): - valid_account_ids = ( - self.get_valid_accounts() - ) # todo verificare che venga fatto solo su invoice_line_ids + valid_account_ids = self.get_valid_accounts() if not valid_account_ids: self.update({"hide_link_asset_button": True}) else: @@ -85,7 +83,7 @@ def _compute_hide_link_asset_button(self): not any( [ line.account_id.id in valid_account_ids.ids - for line in move.line_ids + for line in move.invoice_line_ids ] ) or move.state != "posted"