[FIX] sale: missing triggers on invoice_ids
As 'invoice_ids' on sale.order is a computed field, creating a refund should invalidate this field as 'invoice_ids' should contain invoices, refunds, ... When using the refund wizard, the credit note will be linked to the SO lines (see `_refund_cleanup_lines` override in sale). Without the new trigger, invoice_ids will not be recomputed, and executing 'sale_order.invoice_ids[1]' will not return the refund account.invoice. This commit fixes it.
This commit is contained in:
@@ -39,7 +39,7 @@ class SaleOrder(models.Model):
|
||||
'amount_total': amount_untaxed + amount_tax,
|
||||
})
|
||||
|
||||
@api.depends('state', 'order_line.invoice_status')
|
||||
@api.depends('state', 'order_line.invoice_status', 'order_line.invoice_lines')
|
||||
def _get_invoiced(self):
|
||||
"""
|
||||
Compute the invoice status of a SO. Possible statuses:
|
||||
|
||||
Reference in New Issue
Block a user