Hello guys,
with this post i know it is possible to create a task when an order is validate : "Automatically create Task When order validate - Odoo V12"
Now I would like to be able to create only one task per quote and not per product in the quote.
For that I see 3 solutions:
- Add a line in the quotation that allows you to create the task (for example the product development) and make it invisible (customers don't need to see that)
- Create a task for a quote and not for a product
- Create a task for a product set
Do you have any simpler ideas or a way to do one of the 3 above?
In addition to that I would like to modify the name of the task created according to the elements of my estimate, is it native or do you know the location of the code allowing the transfer of information from the estimate to the task to be able to overload it?
edit :
so in reality what I really need is to know where the method that creates the task or project since the validation of the quote is, do you know where I can find it and what its name is?
edit 2 :
I finally solved my problem, the function to overload to add new fields or modify existing ones is the following method :
https://github.com/odoo/odoo/blob/master/addons/sale_timesheet/models/sale_order.py#L267
the entry point is here:
https://github.com/odoo/odoo/blob/master/addons/sale_timesheet/models/sale_order.py#L193
To have only one task / project per quote and not per product, you must override the _timesheet_service_generation method of the SaleOrderLine class located in sale_timesheet/models/sale_order.py
This subject can be closed.