Skip to content

[20.0][MIG] report_qweb_parameter: Migration to 20.0 - #1231

Merged
OCA-git-bot merged 20 commits into
OCA:20.0from
Tecnativa:20.0-mig-report_qweb_parameter
Nov 26, 2026
Merged

OCA-git-bot merged 20 commits into
OCA:20.0from
Tecnativa:20.0-mig-report_qweb_parameter

Conversation

@carlosdauden

Copy link
Copy Markdown

etobella and others added 19 commits October 27, 2026 14:18
If reusing existing records, there's the risk of conflicting tests, like modifying
the VAT for the existing company and that company having a country with VAT check.

We avoid it creating a new company instead.
…@T-raw

WARNING devel odoo.addons.base.models.ir_qweb: Found deprecated directive
@T-raw='docs.env["ir.qweb"].check_length(docs[0].vat, 10, False)[:10]' in template 237.
Replace by @t-out, and explicitely wrap content in `Markup` if necessary
(which likely is not the case)

WARNING devel odoo.addons.base.models.ir_qweb: Found deprecated directive
@T-raw='docs.env["ir.qweb"].check_length(docs[0].company_registry, False, 10)'
in template 237. Replace by @t-out, and explicitely wrap content in `Markup`
if necessary (which likely is not the case)
Execute pre-commit to remove the existing warning.

WARNING prod py.warnings: /opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py:178:
DeprecationWarning: XML declarations in HTML module descriptions are deprecated since Odoo 17,
report_qweb_parameter can just have a UTF8 description with not need for a declaration.
@oca-cla-bot

oca-cla-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added series:20.0 mod:report_qweb_parameter Module report_qweb_parameter labels Nov 9, 2026

@adasatorres-tecnativa adasatorres-tecnativa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Please, squash the administrative commits.

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code review: LGTM, just one minor change in the test. If you can apply it, that would be great.

Comment on lines +22 to +45
<li id="esc_length"
t-minlength="10"
t-length="10"
t-out="docs[0].street"
t-if="docs[0].street"/>
<li id="esc_conditional_length"
t-length="3"
t-out="docs[0].name or docs[0].phone"/>
<li id="esc_maxlength"
t-maxlength="10"
t-out="docs[0].website"
t-if="docs[0].website"/>
<li id="raw_length"
t-minlength="10"
t-length="10"
t-out="docs[0].vat"
t-if="docs[0].vat"/>
<li id="raw_conditional_length"
t-length="4"
t-out="docs[0].name or docs[0].phone"/>
<li id="raw_maxlength"
t-maxlength="10"
t-out="docs[0].phone"
t-if="docs[0].phone"/>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this data is duplicated and unnecessary. It made sense before, because you were testing t-raw and t-esc, but now only t-out is tested.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, the test keeps only the t-out items and their checks. The administrative commits are squashed too, as @adasatorres-tecnativa asked.

Server QWeb no longer has the t-esc and t-raw directives in 20.0 (only t-out is compiled), so the overrides of _compile_directive_esc and _compile_directive_raw are dropped; t-length, t-minlength and t-maxlength keep working on t-out, which is the only public contract of the module.

Tests: the test template keeps only its t-out items, since the t-esc and t-raw ones would now repeat them, and res.company has no company_registry field in 20.0, so it uses phone instead; the test still renders the report and checks truncation and both length validations.
@carlosdauden
carlosdauden force-pushed the 20.0-mig-report_qweb_parameter branch from 03db641 to cfeb6bb Compare November 26, 2026 09:51
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration report_qweb_parameter
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 20.0 milestone Nov 26, 2026
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 20.0-ocabot-merge-pr-1231-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Nov 26, 2026
3 of 22 tasks
@OCA-git-bot
OCA-git-bot merged commit 4b218cf into OCA:20.0 Nov 26, 2026
7 of 8 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at e7501f5. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza
pedrobaeza deleted the 20.0-mig-report_qweb_parameter branch November 26, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.