odoo already have a module which create a Task from sale order.But i want exactly inverse of that module ,how to create a task as a sale order.
The Following details are Transferred to the Sale Order:
- Task description is posted as to OrderLine , column Description , one per task.
- Timesheets entries are Transferred to the Description column as well, in Following format:
Date_from - DATE_TO: Hours: Mins, DEVELOPER_NAMEDescription / Notes
Date_from - DATE_TO: Hours: Mins, DEVELOPER_NAME
Description / Notes
- Total of the time logged on Timesheets is Transferred to Ordered Qty column.
Thanks Pawan for your detail description,
Will you please explain me in detail that which view i have to inherit and what all the logic i have to write because i am having basic knowledge in odoo9 backend .I am writing it as answer because i don't have enough points to reply for comment
Thanks in advance
Explaining Logic here is a bit lengthy process, anyway that is upto your skill and requirement, regarding inheriting, as said you have to be working on project.task and sale.order object
1) inherit project.task -> override write() method -> call super() method
2) use search() on sale.order to check for sale.order record for project(project.project) of respective tasks (use anal
3) if no sale.order exist for that project then create one else use existing one, (now u are having a sale.order record for that project)
4) create a sale.order.line record for current project.task recors(don't forget to add current task id in sale.order.line)
5) Please refer my answer also
6) And you are done!!