mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Fix deletion of invoice
This commit is contained in:
@@ -36,6 +36,7 @@ class AccountInvoice(models.Model):
|
||||
def action_cancel(self):
|
||||
"""Cancel the spread lines and their related moves when
|
||||
the invoice is canceled."""
|
||||
self.move_id.mapped('line_ids').remove_move_reconcile()
|
||||
res = super().action_cancel()
|
||||
for invoice_line in self.mapped('invoice_line_ids'):
|
||||
moves = invoice_line.spread_id.line_ids.mapped('move_id')
|
||||
|
||||
Reference in New Issue
Block a user