[FIX] sale: correct _get_to_invoice_qty depends
`product_id.invoice_policy` dependency was missing. When changing the policy from "delivery" to "order" of a product, the quantity of invoiceable products was not recomputed and remained 0 Closes odoo/odoo#60674 closes odoo/odoo#61026 X-original-commit: cfc9abe14689db82acf1872fa8d358662fc7e123 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
ae095de366
commit
7f01ea640f
@@ -1184,7 +1184,12 @@ class SaleOrderLine(models.Model):
|
||||
else:
|
||||
line.product_updatable = True
|
||||
|
||||
@api.depends('qty_invoiced', 'qty_delivered', 'product_uom_qty', 'order_id.state')
|
||||
@api.depends(
|
||||
'qty_invoiced',
|
||||
'qty_delivered',
|
||||
'product_uom_qty',
|
||||
'order_id.state',
|
||||
'product_id.invoice_policy')
|
||||
def _get_to_invoice_qty(self):
|
||||
"""
|
||||
Compute the quantity to invoice. If the invoice policy is order, the quantity to invoice is
|
||||
|
||||
Reference in New Issue
Block a user