Repository navigation
[20.0][MIG] report_xlsx: Migration to 20.0 - #1203
propublisher01 wants to merge 58 commits into
Conversation
…s to print to the 'create_xlsx_report' method + Instanciate the parser and make it available for the 'generate_xlsx_report' method
|
Thanks a lot for this migration! It installs and its tests pass locally on 20.0 with a clean log. One thing blocks it for now: commit 5299985 carries a Could you please amend that commit, replacing the trailer with I will be glad to review again right after. |
5299985 to
b07289a
Compare
|
Done, thanks for pointing this out! |
…t_xlsx PRs account_financial_report depends on date_range and report_xlsx. Their 20.0 migrations are open pull requests: OCA/server-ux#1341 and OCA/reporting-engine#1203. Install them from the pull request heads until they are merged.
…t_xlsx PRs account_financial_report depends on date_range and report_xlsx. Their 20.0 migrations are open pull requests: OCA/server-ux#1341 and OCA/reporting-engine#1203. Install them from the pull request heads until they are merged.
|
@propublisher01 why it is draft ? |
|
This PR has the |
…t_xlsx PRs account_financial_report depends on date_range and report_xlsx. Their 20.0 migrations are open pull requests: OCA/server-ux#1341 and OCA/reporting-engine#1203. Install them from the pull request heads until they are merged.
|
@propublisher01 can you mark the PR ready so @pedrobaeza can merge? |
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
Non-blocking comment, but it would be great if you could apply this.
Additionally, please squash the administrative commits.
TT64867
| _logger.debug("Can not import openpyxl`.") | ||
|
|
||
|
|
||
| class TestReport(common.TransactionCase): |
There was a problem hiding this comment.
Could you please inherit from BaseCommon and change setUp to setUpClass?
Currently translated at 23.0% (3 of 13 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_xlsx/hr/
Currently translated at 100.0% (13 of 13 strings) Translation: reporting-engine-16.0/reporting-engine-16.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_xlsx/es/
This implements behavior expected when configuring "Save as Attachment Prefix" within xlsx reports.
Currently translated at 100.0% (7 of 7 strings) Translation: reporting-engine-17.0/reporting-engine-17.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_xlsx/it/
Currently translated at 100.0% (7 of 7 strings) Translation: reporting-engine-17.0/reporting-engine-17.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_xlsx/sv/
* report_py3o, report_xlsx, report_xml odoo core introduced an additional argument in [1] to the method inherited by report_py3o, report_xlsx, report_xml. When the same method is inherited in other addons, it raises a "TypeError: ... takes X positional arguments but Y were given" due to a mismatch in the argument count. This commit updates the mentioned method signature to match the latest odoo core definition, ensuring compatibility and preventing runtime errors when multiple addons override the same function. No functional changes are introduced. Only method signatures have been synchronized with upstream Odoo
Currently translated at 85.7% (6 of 7 strings) Translation: reporting-engine-18.0/reporting-engine-18.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xlsx/tr/
Currently translated at 100.0% (7 of 7 strings) Translation: reporting-engine-18.0/reporting-engine-18.0-report_xlsx Translate-URL: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xlsx/tr/
…rt instead of user context
…r on OCA Financial Reports.
- odoo.http is now a package: import content_disposition from odoo.http.stream and serialize_exception from odoo.http.dispatcher. - ir.actions.report no longer has a report_file field: removed from the demo data, the tests and the usage example. Assisted-by: Claude Opus 5.5
b07289a to
42922c2
Compare
|
@carlos-lopez-tecnativa Done: tests now inherit from BaseCommon with setUpClass (test user in base.group_system, since report actions require it), and the administrative commits are squashed (110 → 58 commits, translations from different translators kept separate). Tests pass locally on 20.0. @micheledic ready for merge on my side, thanks! |
pedrobaeza
left a comment
There was a problem hiding this comment.
In a test in the runboat with the demo report, I see that the report is not automatically added to the print menu, so I think you need to add this for getting it (not tested though) and ease the demo testing.
| <field name="name">Print to XLSX</field> | ||
| <field name="model">res.partner</field> | ||
| <field name="report_type">xlsx</field> | ||
| <field name="report_name">report_xlsx.partner_xlsx</field> |
There was a problem hiding this comment.
| <field name="report_name">report_xlsx.partner_xlsx</field> | |
| <field name="report_name">report_xlsx.partner_xlsx</field> | |
| <field name="binding_model_id" ref="base.model_res_partner"/> | |
| <field name="binding_type">report</field> |
Migration of
report_xlsxto 20.0 (history preserved withgit format-patch/git am).Changes:
odoo.httpis now a package:content_dispositionis imported fromodoo.http.streamandserialize_exceptionfromodoo.http.dispatcher.ir.actions.reportno longer has areport_filefield: removed from the demo data, the tests and the usage example (README regenerated).Tested on Odoo 20.0 (nightly 20260928), with demo data:
/report/xlsx/...and/report/downloadreturn a valid.xlsxfile.The JS report handler needs no change: the
ir.actions.report handlersregistry and its(action, options, env)signature are unchanged in 20.0.AI assistance: this migration was prepared with Claude Opus 5.5 (Claude Code); I reviewed and tested every change. Commits carry the corresponding
Assisted-by:trailer.