Daily updates from Odoo
Thursday, February 22, 2024
13 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 fixes a visual glitch in the ecommerce category scrollbar on recent Chrome browsers and ensures consistent styling across Odoo. It also addresses an issue where the scrollbar was obscured on touchscreens and ensures proper display on various devices.
Original PR description
In commit https://github.com/odoo/odoo/commit/bdede43e1ea4587185a9f37f051cee87a61cf488 an improvement was made to increase the scrollbar height on hover to make it easier to scroll. However chromium…
In commit https://github.com/odoo/odoo/commit/bdede43e1ea4587185a9f37f051cee87a61cf488 an improvement was made to increase the scrollbar height on hover to make it easier to scroll. However chromium updated the way ::webkit-scrollbar works breaking the behavior on recent browser. On firefox the margin was applied without the change of height on the scrollbar creating a visual glitch on hover. On chromium >121 the `scrollbar` property takes priority over the `::webkit`-x to keep the scrollbar styling with height change on webkit browser we have to apply the `scrollbar` property only on Firefox. The mixin was used only on `website_sale` filter offcanvas and category horizontal scrollbar, this commit removes the mixin and customization on the offcanvas vertical scroll to make it consistent with the other offcanvas across website. This PR also disables the scrollbar hover effect on touchscreens. The transform was causing an issue on some devices displaying the scrollbar behind the items, thus it's now applied on the container. Note: We use not `.o_wsale_filmstip_fancy_disabled` to avoid the `scrollbar` property being set when the Javascript is not loaded yet. Otherwise the scrollbar would be invisible until a hover from the user. task-3718501 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#152456
This update fixes an issue where large numbers (formatted with commas) were being incorrectly parsed when sharing data via Odoo's spreadsheet feature. Previously, the share link would display the number in a simplified format. Now, the share link exports the raw, formatted value, ensuring accurate sharing of amounts, especially those with thousands or millions.
Original PR description
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#154712 Forward-Port-Of: odoo/odoo#153704
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 resolves an issue where dropdown menus within the Odoo Studio editor wouldn't close when the toolbar was clicked. The fix addresses a technical limitation with the iframe environment, ensuring that clicks outside the editor now properly close dropdowns. This improves the user experience when working with reports and documents in Studio.
Original PR description
Steps to reproduce: =================== - Open any app (sales for example) - Toggle studio - select reports tab - Select any report - Select some text and open any dropdown (font size or color) - Click somewhere else on the document - Select some text again - The dropdown stayed open from the first select Origin of the issue: ==================== Clicking somewhere on the document in studio doesn't trigger the events `defined in bootstrap/js/dist/dropdown.js` because of the iframe. Solution: ========= Trigger click event on toggle button for the opened dropdown when hiding the toolbar to close them task-3674736 Forward-Port-Of: odoo/odoo#152681
This update fixes a bug where articles were incorrectly flagged as needing to be saved, leading to frequent and unwanted autosaves. The fix removes irrelevant information (history IDs) from the comparison process, ensuring autosaves only occur when actual content changes are made. This improves performance and user experience.
Original PR description
Issue: Articles were erroneously marked as changed, leading to unnecessary autosaves. Part of this was caused by the inclusion of history IDs in the content comparison process, which differ even without substantive content changes. Solution: Applied `stripHistoryIds` to the content obtained from the WYSIWYG editor before performing the dirty check. This ensures that comparisons focus solely on actual content changes, eliminating history IDs as a factor in the dirty state determination. opw-3707380 Forward-Port-Of: odoo/odoo#154068
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
This update fixes an issue where the legal note from a fiscal position on invoices was not appearing after installing the l10n_it module. The problem stemmed from an incorrect condition within the module that limited note display to Italian companies. Removing this condition ensures the note appears correctly for all invoices.
Original PR description
Steps to reproduce: - Install Accounting - Create a fiscal position with a legal note - Create an invoice with the created fiscal position - Preview the invoice => The legal note from the fiscal position appears on the invoice as expected - Install l10n_it - Preview the invoice => The legal note from the fiscal position doesn't appear anymore Cause: The condition to display the legal note from the fiscal position is overridden by l10n_it module to only display it for Italian companies, which is not correct. Solution: Remove the condition about the Italian companies. By removing that condition, the inherited view becomes useless as the overridden condition is the same as the original one. The inherited view will have to be removed in master. opw-3709443 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#153638
Documentation and clarification updates
This pull request formally confirms the signing of a legal agreement (CLA) with Asergo, a key partner for Odoo's SaaS offering. This action ensures compliance and strengthens our legal relationship. The change is a procedural update related to legal documentation.
Original PR description
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154828
This pull request formally incorporates a legal agreement (CLA) from Buckstop Labs. Previously, this agreement was missing, but it has now been added to ensure compliance with Odoo's open-source licensing. This update allows for the continued use of Buckstop Labs' contributions within the Odoo project.
Original PR description
Description of the issue/feature this PR addresses: added my agreement Current behavior before PR: did not include my agreement Desired behavior after PR is merged: you can read the .md i added. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#154830