Skip to content

[ADD] construction_developer: add project progress report#2044

Open
mega-odoo wants to merge 6 commits into
odoo:19.0from
odoo-dev:saas-19.2-construction-developer-progress-report-mega
Open

[ADD] construction_developer: add project progress report#2044
mega-odoo wants to merge 6 commits into
odoo:19.0from
odoo-dev:saas-19.2-construction-developer-progress-report-mega

Conversation

@mega-odoo
Copy link
Copy Markdown
Contributor

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

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented Apr 24, 2026

Pull request status dashboard

@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch 2 times, most recently from 05a11a1 to e5121ab Compare April 30, 2026 14:22
@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch from e5121ab to f1a0916 Compare May 4, 2026 10:50
@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch 9 times, most recently from f9f819f to cce26d6 Compare May 15, 2026 13:03
Copy link
Copy Markdown
Contributor

@pgu-odoo pgu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<template id="prgress_report_document">
<template id="progress_report_document">

@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch from a7cd1d1 to 0fd7b97 Compare May 21, 2026 14:06
Copy link
Copy Markdown
Collaborator

@vava-odoo vava-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you remove that one?

Comment on lines +79 to +80
sale_order = records.order_id[:1]
project_id = sale_order.project_id
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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':
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how could it be false?

<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="name">x_current_progress</field>
<field name="name">x_cumulated_progress</field>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"/>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 -->
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this discussed and decided? We could leave it for now in case

mega-odoo added 4 commits May 26, 2026 15:45
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
@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch from 0fd7b97 to 16da484 Compare May 26, 2026 10:16
@mega-odoo mega-odoo changed the base branch from saas-19.2 to 19.0 May 26, 2026 10:17
@mega-odoo mega-odoo force-pushed the saas-19.2-construction-developer-progress-report-mega branch from 5fbffc6 to dfe395b Compare May 27, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants