Saturday, January 20, 2024
8 changes · 17.0
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
Resolved issues and error corrections
This update corrects how product names are handled in the translation system for the product UNSPSC module. Product names are now properly excluded from translation files, which reduces unnecessary translation work and prevents confusion in multilingual environments. This ensures the translation system focuses only on the strings that actually need to be translated.
This fix corrects an issue where error notification emails from the subscription module were displaying HTML formatting in the subject line, making them appear unprofessional to recipients. The subject line now displays as plain text for a cleaner appearance in email clients.
Original PR description
Before this commit, the error mail subject was converted to HTML. It would not look professionnal in a mail client...
This update removes redundant test execution that was occurring when test classes inherited from parent classes. Previously, 51 tests were being run multiple times unnecessarily, including repeated execution during post-installation builds. This fix streamlines the testing process, reducing build time and improving efficiency without changing any actual functionality.
Original PR description
When a test case class inherits from another class that has test methods, those tests are executed again for both classes. While it could be done on purpose, it does not seems to be the case here. Moreover, in this particular case, we are talking about 51 tests. Also, as the child class is tagged `post_install` those tests are run again on runbot in a post install build. This class is also inherited in more class in upper Odoo version, in master those tests are run up to 18 times. Forward-Port-Of: odoo/odoo#149959
This update fixes an unreliable test in the messaging system that was occasionally failing. The test verifies that users can successfully retry loading more messages after a failed attempt. By simplifying the test approach, it now runs more consistently and reliably.
Original PR description
Before this PR, the "Retry loading more messages on failed load more messages" test was sometimes failing. This test uses the `afterEvent` helper to wait for the load message event to occur. This is too technical and not reliable: this test just ensures that clicking on the retry button after failing to load more messages work as expected. This PR simplify this test and make use of the `contains` helper which is more reliable to do so. First, 30 messages are loaded, then the retry button appears and finally, clicking on the retry button should load 30 more messages for a total of 60. fixes runbot-53201 Forward-Port-Of: odoo/odoo#149923 Forward-Port-Of: odoo/odoo#147663
This update ensures that all motivational messages in the gamification module are properly exported for translation. Previously, demo data was overwriting original messages, preventing them from being translated into other languages. The fix adds original messages to the demo data so they can be translated while remaining hidden from users.
Original PR description
For some reason the demo data for some of the ranking motivational messages is different from their default motivational message (in data). Because of the way the `translate=html_translate` works, when the demo data was installed, the original motivational message was overwritten and therefore not exported in the .pot file so it could never be translated. Since we want both the demo and original messages translated, it's best that we add the original messages into the demo data so that it's not visible to users, but is still exported to the .pot file. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#150206 Forward-Port-Of: odoo/odoo#149231
This update fixes an issue where tests in the barcode nomenclature module were running twice due to unnecessary class inheritance. By removing the redundant inheritance, tests now execute only once, improving testing efficiency and reducing unnecessary processing time.
Original PR description
When inheriting from a test class having tests methods, the tests are played twice. In this particular case, the inheritance was not necessary at all. Forward-Port-Of: odoo/odoo#150165
This update fixes an issue where tests in the Sales MRP modules were being executed twice due to improper test class inheritance. By removing the duplication, the test suite now runs more efficiently without redundant test executions, saving time and resources in the quality assurance process.
Original PR description
By inheriting from a test class that contains test methods, these tests are executed twice. Forward-Port-Of: odoo/odoo#150107