summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorXavier BOL (xbo) <xbo@odoo.com>2020-11-20 09:28:32 +0100
committerYannick Tivisse <yti@odoo.com>2020-11-28 09:25:53 +0100
commitb748732edfc9ce09d3181620d5798a0e6631b867 (patch)
tree82325832b4635b4e1dca68ef42618aa387107f95 /addons/web/static/src/js/views/basic/basic_model.js
parentd20d1e22883bcd9493eb22ee58b539778ed6ff06 (diff)
[FIX] sale_timesheet: add link between ticket and sale order
When the user wants to create a sale order line from a ticket where the pricing type of the project linked is "project rate" or "employee rate" the sale order created contain the sale order line(s) with the quantity and delivery quantity set to 0. It's because the ticket it's not linked to a task in the project and the sale order line in project is updated only at the end of the process. That's why the timesheet(s) on ticket is/are not linked in the first sale order line on the sale order created. This commit uses the context key create in helpdesk_sale_timesheet to know that the user creates a sale order from a ticket. This context key contains the id of all timesheets created in the ticket. If the project linked to the ticket doesn't contain any tasks. Then, we add the first sale order line created in the project and then we linked the timesheet to this sale order line. Afterwards, if the user want to create more than one sale order line. We need to update the sale order line linked in the project by the last sale order line created in the new sale order. task-2388500
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions