Skip to content

Commit

Permalink
[FIX] fixed manual declaration of intent selection
Browse files Browse the repository at this point in the history
the form allows only add declarations of intent,
this fix clears the set before adding new ones

closes #4576
  • Loading branch information
sherpya committed Jan 30, 2025
1 parent 8f0e9a1 commit c2c59d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion l10n_it_declaration_of_intent/wizard/select_declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def confirm(self):
if not invoice_id:
return res
invoice = self.env["account.move"].browse(invoice_id)
declaration_of_intent_ids = [(5, 0)]

Check warning on line 49 in l10n_it_declaration_of_intent/wizard/select_declarations.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_declaration_of_intent/wizard/select_declarations.py#L49

Added line #L49 was not covered by tests
for declaration in self.declaration_ids:
invoice.declaration_of_intent_ids = [(4, declaration.id)]
declaration_of_intent_ids.append((4, declaration.id))
invoice.declaration_of_intent_ids = declaration_of_intent_ids

Check warning on line 52 in l10n_it_declaration_of_intent/wizard/select_declarations.py

View check run for this annotation

Codecov / codecov/patch

l10n_it_declaration_of_intent/wizard/select_declarations.py#L51-L52

Added lines #L51 - L52 were not covered by tests
return True

0 comments on commit c2c59d3

Please sign in to comment.