Skip to content

Commit

Permalink
Merge PR #4191 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by renda-dev
  • Loading branch information
OCA-git-bot committed Jun 21, 2024
2 parents eb5a22d + ab46d9f commit 1a55919
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions l10n_it_delivery_note/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,13 @@ def unlink(self):
for dn in dnls_to_unlink.mapped("delivery_note_id"):
dn.state = "confirm"
return res

def button_cancel(self): # pylint: disable=missing-return
super().button_cancel()
dn_lines = (
self.invoice_line_ids.sale_line_ids.delivery_note_line_ids
| self.delivery_note_ids.line_ids
)
dn_lines.sync_invoice_status()
dn_lines.delivery_note_id._compute_invoice_status()
dn_lines.delivery_note_id.state = "confirm"

0 comments on commit 1a55919

Please sign in to comment.