Skip to content

Commit

Permalink
[FIX] use invoice_line_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiocorato committed Jan 5, 2023
1 parent 672c785 commit 9eed9d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions assets_management/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 9eed9d9

Please sign in to comment.