[ADD] construction_developer: add project progress report#2044
[ADD] construction_developer: add project progress report#2044mega-odoo wants to merge 6 commits into
Conversation
05a11a1 to
e5121ab
Compare
e5121ab to
f1a0916
Compare
f9f819f to
cce26d6
Compare
pgu-odoo
left a comment
There was a problem hiding this comment.
@vava-odoo PR is ready for your review.
@mega-odoo Good work!
Just a few comments.
| project_id = sale_order.project_id | ||
| action = env.ref('construction_developer.report_progress_saleorder').report_action(project_id) | ||
| if action.get('res_model') == 'base.document.layout': | ||
| action['context'] = dict( action.get('context', {}), active_model='sale.order', active_id=sale_order.id) |
There was a problem hiding this comment.
| action['context'] = dict( action.get('context', {}), active_model='sale.order', active_id=sale_order.id) | |
| action['context'] = dict(action.get('context', {}), active_model='sale.order', active_id=sale_order.id) |
| </attribute> | ||
| </xpath> | ||
| </template> | ||
| <template id="prgress_report_document"> |
There was a problem hiding this comment.
| <template id="prgress_report_document"> | |
| <template id="progress_report_document"> |
a7cd1d1 to
0fd7b97
Compare
vava-odoo
left a comment
There was a problem hiding this comment.
Some questions/comments on the implementation. Also, why does it target 19.2?
| <strong>Automated cost update</strong> - Automatically adjusted product costs and vendor list based on confirmed purchase orders and invoices. | ||
| </li> | ||
| <li> | ||
| <strong>Materials Need Management</strong> - Manage the sale order shopping list deciding for reservation, purchase and drop shipping. |
There was a problem hiding this comment.
why do you remove that one?
| sale_order = records.order_id[:1] | ||
| project_id = sale_order.project_id |
There was a problem hiding this comment.
I don't get the logic here. You want to print all lines linked to the project. But the link could be on the SOL or the SO. Why don't you provide the project id somehow in the context?
| sale_order = records.order_id[:1] | ||
| project_id = sale_order.project_id | ||
| action = env.ref('construction_developer.report_progress_saleorder').report_action(project_id) | ||
| if action.get('res_model') == 'base.document.layout': |
| <field name="model_id" ref="sale.model_sale_order_line"/> | ||
| <field name="name">x_current_progress</field> | ||
| <field name="name">x_cumulated_progress</field> |
There was a problem hiding this comment.
I wouldn't change the field id and name, only the description
| <div class="col-4" name="original_order"> | ||
| <div class="mb-2"> | ||
| <strong>Original Order</strong> | ||
| <div t-field="orders[0].name"/> |
There was a problem hiding this comment.
is it possible to print without linked orders? I'd put a t-if on this div to ensure orders is not empty
| <t t-set="lines_to_report" t-value="order._get_order_lines_to_report()"/> | ||
| <t t-set="display_discount" t-value="any(line.discount for line in lines_to_report)"/> | ||
| <!-- Hide taxes AND show taxed amounts on lines (currently always False)--> | ||
| <!-- TODO: Remove `hide_taxes_details` and related conditions if this industry report is never intended to be inherited --> |
There was a problem hiding this comment.
was this discussed and decided? We could leave it for now in case
Generate a progress report for the projects. This helps standardize the data for architect/customer review and can be used as a legal document. Task ID: 5972435
0fd7b97 to
16da484
Compare
5fbffc6 to
dfe395b
Compare

Generate a progress report for the projects.
This helps standardize the data for architect/customer review and can be used as a legal document.
Task ID: 5972435