Saturday, January 25, 2025
15 changes · saas-18.1
Enhancements to existing features
After someone stops sharing their screen in a call, the view now returns to showing the call participants instead of staying focused on the former screen sharer. This makes calls feel more natural and reduces confusion for users after screen sharing ends.
Original PR description
With this commit after stopping screen share the focus ill not be on the card of the user that was precedently sharing the screen. task-4448823
Resolved issues and error corrections
The call recording button in the messaging composer now keeps its intended shape when active. This prevents a visual distortion where the button became square, improving interface consistency for users making calls.
Original PR description
Purpose of this commit: The call record button, when active, was unintentionally assigned an aspect ratio of 1, causing its height and width to become equal. This commit fixes the issue. Before/After   --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Before this commit, when posting a message with a `@` mention in group chat, the message had blue bubble instead of green bubble. This color means that the message is not recognized as a self message. Steps to reproduce: - make group chat - post a message with `@` mention => the message bubble is blue rather than green This problem is a consequence of https://github.com/odoo/odoo/pull/176758 In this PR, when mentioning from any channel, the `groups_id` of partners from mention suggestio
Original PR description
Before this commit, when posting a message with a `@` mention in group chat, the message had blue bubble instead of green bubble. This color means that the message is not recognized as a self…
Before this commit, when posting a message with a `@` mention in group chat, the message had blue bubble instead of green bubble. This color means that the message is not recognized as a self message. Steps to reproduce: - make group chat - post a message with `@` mention => the message bubble is blue rather than green This problem is a consequence of https://github.com/odoo/odoo/pull/176758 In this PR, when mentioning from any channel, the `groups_id` of partners from mention suggestions could be returned. If the users are in the group of group_public of channel, this means these partners could be invited in the channel. This is useful to make them elligible for `@` mention even when they are not member. This partial knowledge of the group id of partner is provided to client code so that the suggestions are shown too, since the list results in the JS modeling. This PR however introduced a silent crash in JS code from this LOC: https://github.com/odoo/odoo/pull/176758/files#diff-515b5eba2d7fbff9826774f16c701063cfd9c95967287eaec36b16db66ef8c48R102 The server data may send `[ADD, null]` for partner `groups_id`, which is the case in group chat. The internal code of JS models does not expect this kind of command data: it crashes because `ADD` command assumes the other part is genuine data or record(s). However `null` means nothingness, so internally the `target` is missing thus it leads to a crash in the internal code of JS models. Why is the crash not bubbled then? Well, this is silently ignored in business code by the fetch mention function, in `fetchSuggestions`. The silent crash is suspicious, but not necessarily the primary cause of the problem... No no no. Internal code of JS models has made a bigger sin: the silent crash aborts the pending update cycle, thus not flushing it. This is a huge problem, because the implementation of update cycle is made in a way that its integrity depends on no crash during the update cycle. That's because the synchronous processing of update cycle defines layers of update cycle with a global counter that is incremented and decremented. The 1st update cycle layer manages the flush, while the other layers do the operations without flush. If there's a crash during the update cycle, the update cycle is aborted but its counter is preserved. Let's say the counter is 4: that means the update queues are never flushed, because the only way to change this value is through `MAKE_UPDATE`, and this function only preserves its value or temporarily increases it. So what's the deal with the green bubble being blue? Well, there's a computed field `isSelfAuthored` that was never computed because of the silent crash. Thus it had the default value `false` rather than `true` for self messages. While the symptoms show blue bubble instead of green bubble, which feels cute but not a big deal... This was actually a side-effect of a much much bigger issue that compromises the overall modeling of JS. Yes, that's like having an eye tickling, thinking that we're just tired but it's actually a symptom of final stage cancer. Do not worry though: this commit doesn't cure cancer, but it fixes this problem as follow: `fetchSuggestions` in business code should not silently catch non-abort errors, and bubble it. Forward-Port-Of: odoo/odoo#194755
This fix restores support for an older JSON route setting so existing customizations do not fail unexpectedly after upgrading. It also adds a clearer warning and error message to help teams migrate smoothly to the newer setting.
Original PR description
Commit 67b6ef3 changed `@route(type='json')` for `@route(type='jsonrpc')` but with no deprecation warning. Using `@route(type='json')` resulted in a (not so obvious) AssertionError. In this work, we restored `type='json'` as a deprecated alias to `type='jsonrpc'`, the warning is only logged once. We also improved the assertion message so it lists the valid types. If you need cross-version compatibility (down to 16.0) you might also do: from odoo.http import JsonRPCDispatcher @route(..., type=JsonRPCDispatcher.routing_type) There's also a upgrade-code script to help you change all `type='json'` to `type='jsonrpc'`: odoo-bin upgrade_code --help odoo-bin upgrade_code --script route-jsonrpc task-4257153
Subcontracting receipts no longer show the same Detailed Operation button twice on product moves. This reduces confusion for users processing purchase receipts and makes the screen clearer.
Original PR description
Issue: =========== Currently, the 'Detailed Operation' button appears twice on each product move for subcontracting receipts. Steps to Reproduce: =========================== 1. Create a Bill of Materials (BOM) with the type set to 'Subcontracting'. 2. Create a Purchase Order (PO) for the product associated with the BOM. 3. Navigate to the receipt for that PO. 4. Observe that the 'Detailed Operation' button appears twice for each move. With this commit: ===================== A duplicate detailed operation button was displayed in each product move for subcontracting receipts due to code duplication, leading to redundancy and confusion. This fix removes the extra button to ensure a clear and intuitive UI. task-4467313
The name search on the account field (account.account on account move line) looks for frequently used accounts for the partner. When no search text is provided, the name search suggests accounts that were previously used. When there are no frequent accounts, the name search returns nothing. To reproduce - create a vendor bill - select a partner that has never been billed - add a line - click the account many2one field dropdown Since no account options are available, the dropdown flas
Original PR description
The name search on the account field (account.account on account move line) looks for frequently used accounts for the partner. When no search text is provided, the name search suggests accounts that were previously used. When there are no frequent accounts, the name search returns nothing. To reproduce - create a vendor bill - select a partner that has never been billed - add a line - click the account many2one field dropdown Since no account options are available, the dropdown flashes open and quickly disappears. Forward-Port-Of: odoo/odoo#194303 Forward-Port-Of: odoo/odoo#193999
Livechats can be configured to automatically open a chat window when a visitor opens a page. This should only occur once per visitor not to bother visitors. Before this PR, this occured each time the visitor accessed the page. The information on whether the popup was donce once is stored in the local storage but is incorrectly checked. This PR fixes the issue. opw-4503667 Forward-Port-Of: odoo/odoo#195075
Original PR description
Livechats can be configured to automatically open a chat window when a visitor opens a page. This should only occur once per visitor not to bother visitors. Before this PR, this occured each time the visitor accessed the page. The information on whether the popup was donce once is stored in the local storage but is incorrectly checked. This PR fixes the issue. opw-4503667 Forward-Port-Of: odoo/odoo#195075
**Current behavior before PR:** Since [1](https://github.com/odoo/odoo/pull/192336) when a user discarded the `Turn on notifications` option from the messaging menu, the systray notification counter was not updated. This issue occurred due to an incorrectly written condition. **Desired behavior after PR is merged:** The issue is resolved, and the systray notification counter is correctly updated when the user discards the native notification prompt. --- I confirm I have sig
Original PR description
**Current behavior before PR:** Since [1](https://github.com/odoo/odoo/pull/192336) when a user discarded the `Turn on notifications` option from the messaging menu, the systray notification counter was not updated. This issue occurred due to an incorrectly written condition. **Desired behavior after PR is merged:** The issue is resolved, and the systray notification counter is correctly updated when the user discards the native notification prompt. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194700
Brings various needed improvements to the module, either in place or via a new extended module. - Neutralization resets to pre-production - Better handling of errors when generating the file by using the commercial partner as expected. - Align all the flows which update the invoice status to ensure that the data is consistent. - Improve validation for some special cases (lines without products, tax exemption) - Add a new field for Malaysian TIN, mostly for foreign entities. Will be us
Original PR description
Brings various needed improvements to the module, either in place or via a new extended module. - Neutralization resets to pre-production - Better handling of errors when generating the file by using…
Brings various needed improvements to the module, either in place or via a new extended module. - Neutralization resets to pre-production - Better handling of errors when generating the file by using the commercial partner as expected. - Align all the flows which update the invoice status to ensure that the data is consistent. - Improve validation for some special cases (lines without products, tax exemption) - Add a new field for Malaysian TIN, mostly for foreign entities. Will be used by default in all flows for MyInvois, with fallback on the Tax ID if empty. - Classification code on invoice line, making the use of products optional. - Rework the views for all fields related to ID on res.partner to align with other similar fields. They will be Readonly on res.partner with a parent id, but displays the value of the commercial partner. - Industrial classification on the partner. - "Full" support of self billing. - Reworked flow to send to MyInvois BEFORE send & print. Which adds support for the QR code generation, and new field to store the QR code long ID. - Send & Print can no longer be used to send invoices to MyInvois after the new module is installed Task-4363294 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#195174 Forward-Port-Of: odoo/odoo#193497
From saas-17.4, the "description" field on "account.tax" has been changed from Char to Html. However, the portal view for the purchase order does not correctly render HTML fields in the taxes column. As a result, the taxes are displayed using only the "name" field in the portal purchase order view. opw-4439126 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194272 Forward-Port-Of: odoo/odoo#193677
Original PR description
From saas-17.4, the "description" field on "account.tax" has been changed from Char to Html. However, the portal view for the purchase order does not correctly render HTML fields in the taxes column. As a result, the taxes are displayed using only the "name" field in the portal purchase order view. opw-4439126 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194272 Forward-Port-Of: odoo/odoo#193677
We are not gonna find a value for domestic_currency_companies everytime, sometime they simply don't exist. In that case, we should check that they exist before we call _get_table_builder_domestic_currency. otherwise syntax of this query: https://github.com/odoo/odoo/blob/18.0/addons/account/models/res_currency.py#L157 is gonna be wrong. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have s
Original PR description
We are not gonna find a value for domestic_currency_companies everytime, sometime they simply don't exist. In that case, we should check that they exist before we call _get_table_builder_domestic_currency. otherwise syntax of this query: https://github.com/odoo/odoo/blob/18.0/addons/account/models/res_currency.py#L157 is gonna be wrong. 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#193964
Before: The typofix feature treats terms in the old and new values with similar text content as the same term, migrating the translations of the old term to the new term. For example The old value has the mapping: 'Draft': 'Brouillon' The new value contains the term: '<span invisible="name or name_placeholder or quick_edit_mode">Draft</span>' Since the old term and the new term share the same text content, 'Draft', after `write`, the new term reuses the old translation of 'Draft'.
Original PR description
Before: The typofix feature treats terms in the old and new values with similar text content as the same term, migrating the translations of the old term to the new term. For example The old value…
Before:
The typofix feature treats terms in the old and new values with similar text content as the same term, migrating the translations of the old term to the new term.
For example
The old value has the mapping:
'Draft': 'Brouillon'
The new value contains the term:
'<span invisible="name or name_placeholder or quick_edit_mode">Draft</span>'
Since the old term and the new term share the same text content, 'Draft', after `write`, the new term reuses the old translation of 'Draft'. However, the translation 'Brouillon' is always visible, unlike its en_US counterpart.
This behavior is acceptable in non-upgrade mode because the user writes the en_US value and is responsible for verifying translations afterward. However, it is problematic during upgrades because users cannot easily identify which records have changed and need to be rechecked.
After:
The translation inheritance behavior can be described as below Translations can be inherited after `write` from old terms to new terms which share the very close text contents
1. when `write` in production mode, text contents for translation terms are more important than the HTML/XML structures of them, and the old term translations should be remained as much as possible. Because
* the writing user is responsible to recheck all translations after `write`.
* it is easier for the writing user to copy technical HTML/XML structures than translate text contents for a language they may not know.
* the feature can also be used as typofix when the only small diff is the text content
2. when `write` in upgrade time, the HTML/XML structure is more important than the text content, and the new term structure should be remained as much as possible. Because
* HTML/XML structures might be changed a lot after upgrade, which may contain behavior relevant diff (e.g. `invisible`), even if text contents are not changed.
* users have no idea which records' values are changed during upgrade and are hard to recheck their translations.
* new terms are highly likely to be correctly translated in the latest po files which will be imported during upgrade.
* the typofix feature can still be remained when the only small diff is the text content
Based on the above feature analysis, we use the below new strategy
1. translations can be inherited only if the old source term and the new source term share the same HTML/XML structure
2. translations can be inherited only if the old translation term and the new source term share the same HTML/XML structure
3. when translations are inherited, MODIFIER_ATTRS will be synchronized with the new source term, other attributes will be copied from the source term if available.
Forward-Port-Of: #194181
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#194816## Issue: Commission RFQ is not auto-generated for journals(payment method lines) without outstanding accounts when an SO invoice is created, a payment is created for it, and it gets reconciled with a bank statement. ## steps to reproduce: 1. go to bank journal and remove the outstanding account from the manual payment method line 2. on the CRM app create a partner commission program with a percentage and attach it to a partner 3. create a sale order with the partner as a referrer and con
Original PR description
## Issue: Commission RFQ is not auto-generated for journals(payment method lines) without outstanding accounts when an SO invoice is created, a payment is created for it, and it gets reconciled with…
## Issue: Commission RFQ is not auto-generated for journals(payment method lines) without outstanding accounts when an SO invoice is created, a payment is created for it, and it gets reconciled with a bank statement. ## steps to reproduce: 1. go to bank journal and remove the outstanding account from the manual payment method line 2. on the CRM app create a partner commission program with a percentage and attach it to a partner 3. create a sale order with the partner as a referrer and confirm it 4. create an invoice from the sale order and validate it 5. register a payment for the invoice using the manual payment method 6. create a bank statement line and reconcile the invoice with it in the bank reconciliation widget 7. check the purchase app and see that no RFQ was created ## Solution: - Before version 18.0 (see [this PR](https://github.com/odoo/odoo/pull/180813)), automatically assigning a default outstanding account ensured that every payment created a journal entry. This journal entry was reconciled with the invoice, triggering `invoice_paid_hook` as the invoice transitioned from `not_paid` to `in_payment`. `_reconcile_pre_hook` filtered out payments already marked as `in_payment` to avoid double-triggering `invoice_paid_hook`. However, since the default outstanding account is no longer assigned automatically, `invoice_paid_hook` is not triggered when an invoice transitions from `not_paid` to `in_payment` and then to `paid` by reconciling it with a bank statement line. - to address this issue we edited `_reconcile_pre_hook` and `_reconcile_post_hook` to handle in payment invoices in these cases. OPW-4282724 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#194298
To comply with Egyptian tax law, we need to remove rate for fixed taxes when sending data to ETA. Official docs say: "if Channel = “ERP” OR Channel = “POS” and itemData[*].taxableItems[*].subType is fixed, itemData[*].taxableItems[*].rate should be zero or omitted" Source (point 36): https://sdk.invoicing.eta.gov.eg/main-calculations/ This fix ensure no values are sent for fixed tax type. Currently using null, which is invalid. opw-4457780 Forward-Port-Of: odoo/odoo#193509
Original PR description
To comply with Egyptian tax law, we need to remove rate for fixed taxes when sending data to ETA. Official docs say: "if Channel = “ERP” OR Channel = “POS” and itemData[*].taxableItems[*].subType is fixed, itemData[*].taxableItems[*].rate should be zero or omitted" Source (point 36): https://sdk.invoicing.eta.gov.eg/main-calculations/ This fix ensure no values are sent for fixed tax type. Currently using null, which is invalid. opw-4457780 Forward-Port-Of: odoo/odoo#193509
1. [FIX] documents: keep translations when embedding action When creating an embedded action from a server action, only one language was copied. Note that we are using `_get_stored_translations` instead of `get_languages` to identify values to write as a simple method to avoid storing too much unnecessary data as possible (e.g., 100 languages installed but only `en_US` on the record). 2. [IMP] documents_account: prepare actions journal customization This can be helpful to guide l
Original PR description
1. [FIX] documents: keep translations when embedding action When creating an embedded action from a server action, only one language was copied. Note that we are using `_get_stored_translations` instead of `get_languages` to identify values to write as a simple method to avoid storing too much unnecessary data as possible (e.g., 100 languages installed but only `en_US` on the record). 2. [IMP] documents_account: prepare actions journal customization This can be helpful to guide less technical users. Task-4486261 Forward-Port-Of: odoo/enterprise#77205