Thursday, February 22, 2024
6 changes · saas-17.1
Enhancements to existing features
This update adjusts Odoo's tax settings to reflect a recent change in Malaysian SST tax regulations. Starting March 1, 2024, the standard SST tax rate will shift from 6% to 8%. This change ensures Odoo accurately reflects the current tax requirements for Malaysian businesses.
Original PR description
As of the first of March 2024, the SST tax will increase from 6% to 8%. To that end, the current 6% tax will be set to inactive by default, and we will add a new 8% service tax to replace it. Task id # 3748127 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154966 Forward-Port-Of: odoo/odoo#154534
Resolved issues and error corrections
This update fixes a translation issue in the DIN 5008 localization for German sales orders. Previously, certain terms like 'Quotation No' were not fully translated. This change ensures all terms in the document layout are correctly translated, improving the user experience for German-speaking customers.
Original PR description
Steps to reproduce: - - Install the DIN 5008 localization - Settings > change the document layout to the DIN 5008 layout - Add the German language to the database and make a contact German - Create a…
Steps to reproduce: - - Install the DIN 5008 localization - Settings > change the document layout to the DIN 5008 layout - Add the German language to the database and make a contact German - Create a sales order for that contact - Click the Preview Button - Click the View Details button **Some terms such as 'Quotation No' are not transalted.** Cause of the issue: - In the pot file, the `odoo-python` flags are not present on the keys of terms present in python files. As such the translations of these terms will not be loaded here: https://github.com/odoo/odoo/blob/4c22cfe59972342363736effc8a37108dbed1f97/odoo/tools/translate.py#L1670 since the lines are not tagged as `PYTHON_TRANSLATION_COMMENT`. Prior to 17.1, (this change: commit 60f66ef21fe96c9418b0b3704149aea9dde70ad1) the translations were still loaded for the "wrong" reasons that they were not tagged as `JAVASCRIPT_TRANSLATION_COMMENT`: https://github.com/odoo/odoo/blob/d9e554bae879c294f39f10d1b666343431ed0e3d/odoo/tools/translate.py#L1681-L1683 Fix: - In order to load the translations of these terms we add the `odoo-python` flags to the keys corresponding to python translations. This can be done automatically by exporting the translations corresponding to the pot file and by replacing the current pot with the newly created file. Even if it was not necessary for the fix to work, the keys have been changed accordingly in the associated po files (just as done everywhere else in the code base). Notes: - - The keys of the nl.po were already updated and have not been changed. - The translation of "Sales Order" in the de.po was changed by the export to the term that seems to be uniformly used in the code base. opw-3734589 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update optimizes how Odoo handles DELETE and UNLINK commands within StaticLists, specifically when adding or removing actions. Previously, a large number of these commands caused significant performance slowdowns. Now, the system processes these commands more efficiently, resulting in faster operation times and a smoother user experience.
Original PR description
Before this commit, calling _applyCommands with a lot of commands DELETE or UNLINK on a StaticList already containing a lot of commands was very slow. This happened for instance in the Automated Rule…
Before this commit, calling _applyCommands with a lot of commands DELETE or UNLINK on a StaticList already containing a lot of commands was very slow. This happened for instance in the Automated Rule form view, click on "Add an action", and in the dialog form view, select a "mail" type, e.g. "Add followers". In that form view there's a many2many field "available_model_ids" which contains at first almost all models of the database (LINK commands). Switching to a "mail" model restricts those models to the ones inheriting from the thread mixin, i.e. it generates a lot of UNLINK commands. On runbot, in represents 1000+ LINK and UNLINK commands. This could take several seconds. With this commit, we no longer iterate over all commands when applying a DELETE or UNLINK command. Instead, we simply push the command, store somewhere the information that we applied such a command, and after having processed all commands, we iterate (once) over this._commands, this.records and this._currentIds to do the necessary cleanups. task 3599674 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#154568
This update resolves an issue where exporting invoices with 0% tax generated incorrect XML files, leading to warning and error messages. The fix ensures that tax exemption information is now correctly placed only within the relevant tax total section of the invoice XML, aligning with UBL standards. This improves data accuracy and avoids potential export failures.
Original PR description
Previously, exporting BIS3 when there is a 0% tax in the invoice will results in the XML showing warning of UBL-CR-601. But if we do not include any TaxExemptionReason reason at all, a fatal error…
Previously, exporting BIS3 when there is a 0% tax in the invoice will results in the XML showing warning of UBL-CR-601. But if we do not include any TaxExemptionReason reason at all, a fatal error BR-E-10 will pop up.
Here is the details of those 2 rules:
```xml
(with context: /*/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory
[normalize-space(cbc:ID) = 'E'][cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT'])
<assert id="BR-E-10" flag="fatal" test="exists(cbc:TaxExemptionReason) or
exists(cbc:TaxExemptionReasonCode)">
[BR-E-10]-A VAT breakdown (BG-23) with VAT Category code (BT-118)
"Exempt from VAT" shall have a VAT exemption reason code (BT-121)
or a VAT exemption reason text (BT-120). </assert>
and
(no context)
<assert id="UBL-CR-601" flag="warning" test="
not((cac:InvoiceLine|cac:CreditNoteLine)/cac:Item/
cac:ClassifiedTaxCategory/cbc:TaxExemptionReason)">
[UBL-CR-601]-A UBL invoice should not include the InvoiceLine
Item ClassifiedTaxCategory TaxExemptionReason </assert>
```
Based on these rules, we can conclude that:
- TaxExemptionReason must not appear in InvoiceLine/Item/ClassifiedTaxCategory
- TaxExemptionReason must appear (when some line in invoice has exempt tax) in TaxTotal/TaxSubtotal/TaxCategory
Previously, the TaxExemptionReason will appear on both places. This commit fixes that and adds a test to ensure that when a 0% tax is present, TaxExemptionReason only appear in TaxTotal/TaxSubtotal/TaxCategory
task-id: 3703206
Forward-Port-Of: odoo/odoo#154865
Forward-Port-Of: odoo/odoo#154055This update resolves an issue that prevented users from correctly editing mega menus in Odoo. The change was necessary due to a recent update to Bootstrap, which triggered an error when the mega menu's dropdown behavior was being utilized. The fix involves a temporary adjustment within Bootstrap itself to ensure proper functionality.
Original PR description
Since [1] when the mega menu were first introduced, to make their edition possible, the bootstrap dropdown behavior was neutralized by removing the `data-[bs-]toggle` attribute. In [2] when Bootstrap…
Since [1] when the mega menu were first introduced, to make their edition possible, the bootstrap dropdown behavior was neutralized by removing the `data-[bs-]toggle` attribute. In [2] when Bootstrap was upgraded to version 5.1.3, the `dataApiKeydownHandler` event handler that is called when up, down or escape are pressed raises an error if `data-bs-toggle` cannot be found on a previous sibling of the dropdown. This makes the approach chosen in [1] incomplete. This commit avoids this issue by temporarily adding a class that is excluded from the event handler selector. The patch must unfortunately be applied within bootstrap itself because the event handler is registered right after the method is defined and we have no way to access the registered event handlers afterwards. This makes it impossible to patch the called method from outside, nor its associated selector. We cannot simply update the selector that was already patched by [3] because it is also used by other methods. A test is included which should mitigate the risk of accidentally losing this patch upon bootstrap upgrades. Steps to reproduce: - Create a mega menu. - Edit the page. - Open the mega menu. - Click inside the mega menu content to have a cursor selection. - Press the arrow up key, the arrow down key or the escape key. => An error dialog was displayed. The same issue happened with a nested menu instead of a mega menu. [1]: https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7 [2]: https://github.com/odoo/odoo/commit/971e5a91aab96d36129a823e03f1f9f1b1293968 [3]: https://github.com/odoo/odoo/commit/daca8fe4e3da4a5ad5fabf3730496a3919af8abc task-3614926 opw-3741670 Forward-Port-Of: odoo/odoo#154864 Forward-Port-Of: odoo/odoo#154409
This update corrects a bug where Stripe payment providers incorrectly linked to the wrong website when activating Stripe for multiple companies. The fix ensures each Stripe provider is associated with the correct company's website, preventing errors and ensuring consistent payment processing across all company environments. This improves stability and reliability for our multi-company users.
Original PR description
Description: In a multi-company environment, `payment.provider` records are specific to each company. After activating Stripe on Company 1, you can set a Website for the record if you wish. If you…
Description: In a multi-company environment, `payment.provider` records are specific to each company. After activating Stripe on Company 1, you can set a Website for the record if you wish. If you wish to activate Stripe for Company 2, Odoo will use `.copy()` to create a new `payment.provider` record for Company 2. However, this will lead to differing incorrect behavior depending on the version. On 16, a new `payment.provider` record will be created, but will be connected to the Website set on Company 1's provider. On 17, Odoo will throw an error after a `check_company` call reveals that the Website set on the new record is for the wrong company, preventing the record from being created. In both cases, the `.copy()` grabs the optional Website set on the existing `payment.provider` record to be used incorrectly for the new record. Desired behavior after PR is merged: The Website relation is always neutralized when Odoo creates a new Stripe `payment.provider` record using the `.copy()` method opw-3683338 Forward-Port-Of: odoo/odoo#154521 Forward-Port-Of: odoo/odoo#154280