Skip to content
Snippets Groups Projects
Unverified Commit 2098b703 authored by Jos De Graeve's avatar Jos De Graeve Committed by Martin Trigaux
Browse files

[FIX] sale_timesheet: set wrong code on analytic line

The product_id is the one of the timesheet line, not the one of the order (which
actually is the one of the first line).
Closes #12013
parent 4601b044
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ class SaleOrder(models.Model):
if not order.project_id:
for line in order.order_line:
if line.product_id.track_service == 'timesheet':
order._create_analytic_account(prefix=order.product_id.default_code or None)
order._create_analytic_account(prefix=line.product_id.default_code or None)
break
return result
......
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