-
-
Notifications
You must be signed in to change notification settings - Fork 827
[15.0][MIG] sale project service tracking copy tasks #1188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15.0][MIG] sale project service tracking copy tasks #1188
Conversation
This module add the possibility to create task in an existing project from the sales order through setting the product with a project template with the desired task. @moduon MT-1028 Co-authored-by: Eduardo de Miguel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
a245886
to
9b54b8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good.
A few suggestions, but only a few are blocking.
sale_project_service_tracking_copy_tasks/models/product_template.py
Outdated
Show resolved
Hide resolved
pp_model = self.env["project.project"] | ||
created_projects = pp_model.browse() | ||
for order in self: | ||
projects = order.mapped("order_line.product_id.project_template_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: shouldn't you filter the products by their service tracking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filtered in _timesheet_service_generation from sale_order_line before the method is called
sale_project_service_tracking_copy_tasks/readme/DESCRIPTION.rst
Outdated
Show resolved
Hide resolved
sale_project_service_tracking_copy_tasks/views/product_template_views.xml
Outdated
Show resolved
Hide resolved
<xpath expr="//field[@name='project_template_id']" position="attributes"> | ||
<attribute | ||
name="attrs" | ||
>{'invisible': [('service_tracking', 'not in', ['task_in_project', 'project_only', 'copy_tasks_in_project'])], 'required': [('service_tracking', 'in', ['copy_tasks_in_project'])]}</attribute> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought(non-blocking): https://github.com/OCA/server-tools/tree/16.0/base_view_inheritance_extension could let you add this in a more resilient fashion.
sale_project_service_tracking_copy_tasks/views/sale_order_views.xml
Outdated
Show resolved
Hide resolved
9b54b8d
to
c93b7c9
Compare
1807a0c
to
0dab46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one missing detail to go.
"summary": "Copy tasks into sale order's project", | ||
"version": "15.0.1.0.0", | ||
"author": "Moduon, Odoo Community Association (OCA)", | ||
"maintainers": ["shide", "EmilioPascual"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"maintainers": ["shide", "EmilioPascual"], | |
"maintainers": ["rafaelbn", "shide", "EmilioPascual"], |
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 7647319. Thanks a lot for contributing to OCA. ❤️ |
This module add the possibility to create task in an existing project from the sales order through setting the product with a project template with the desired task.
@moduon MT-1028
@Shide, @rafaelbn please review 😊