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 OCA#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)]
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
return True

0 comments on commit c2c59d3

Please sign in to comment.