[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:
jem-odoo
2018-05-22 11:52:37 +02:00
parent c71ee8e2d2
commit 13a9e4d93a
+1 -1
View File
@@ -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: