Skip to content

Commit

Permalink
[FIX][12.0] add ability to remove current selection dichiarazione di …
Browse files Browse the repository at this point in the history
…intento in invoice
  • Loading branch information
sergiocorato committed Sep 24, 2021
1 parent 64b32e7 commit 0d136d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions l10n_it_dichiarazione_intento/wizard/manually_declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def confirm(self):
if not invoice_id:
return res
invoice = self.env['account.invoice'].browse(invoice_id)
for declaration in self.declaration_ids:
invoice.dichiarazione_intento_ids = [
(4, declaration.id)]
if self.declaration_ids:
invoice.dichiarazione_intento_ids = [(6, 0, self.declaration_ids.ids)]
else:
invoice.dichiarazione_intento_ids = False
return True

0 comments on commit 0d136d0

Please sign in to comment.