Skip to content
Snippets Groups Projects
Commit daaf5f00 authored by Yannick Tivisse's avatar Yannick Tivisse Committed by jbm-odoo
Browse files

[FIX] sale_timesheet: Ignore cancelled invoices to compute qty_to_invoice


closes odoo/odoo#43359

Related: odoo/enterprise#7747
Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
parent 0392e4e6
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,9 @@ class SaleOrderLine(models.Model):
domain = lines_by_timesheet._timesheet_compute_delivered_quantity_domain()
domain = expression.AND([domain, [
('date', '<=', date),
('timesheet_invoice_id', '=', False)]])
'|',
('timesheet_invoice_id', '=', False),
('timesheet_invoice_id.state', '=', 'cancel')]])
mapping = lines_by_timesheet.sudo()._get_delivered_quantity_by_analytic(domain)
for line in lines_by_timesheet:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment