Daily updates from Odoo
Saturday, January 20, 2024
1 change
Enhancements to existing features
This improvement makes it easier for developers to add custom invoice report formats by extracting the invoice report detection logic into a separate, reusable function. Instead of having to rewrite complex code, developers can now simply override a single method to register new invoice report types. This reduces code duplication and makes the system more maintainable.
Original PR description
*: account_edi, account_edi_ubl_cii, l10n_ch Description of the issue/feature this PR addresses: This PR moves the check whether requested report is an invoice one in a separate function so that it…
*: account_edi, account_edi_ubl_cii, l10n_ch Description of the issue/feature this PR addresses: This PR moves the check whether requested report is an invoice one in a separate function so that it can be inherited in case we need to have extra invoice report formats. Current behavior before PR: In case you generate new invoice reports, EDI document will not be included unless you rewrite (or copy/update) the full code of _render_qweb_pdf() and _render_qweb_pdf_prepare_streams() functions. Desired behavior after PR is merged: With this PR, you can only inherits _is_invoice_report() function to add your new report name. Since this is a IMP PR, I am not sure it would be OK to have it in 16.0 (which is where I would need the functionality for now) ? So I made this PR on v16.0 but also another one on master : https://github.com/odoo/odoo/pull/147120 (since in 17.0 and master account_edi_ubl_cii does not need update there) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#149114 Forward-Port-Of: odoo/odoo#147124