Monday, February 10, 2025
27 changes · saas-17.2
Resolved issues and error corrections
Subscription sales orders now create the expected history log even when an order is created and confirmed in the same background transaction. This improves subscription tracking accuracy for automated processes and integrations, with no expected change to normal UI workflows.
Original PR description
Before this commit, sale.order.log were not created when the SO was created and confirmed in the same transaction. _Mail_track was not called and therefore the result was identical as if the SO was…
Before this commit, sale.order.log were not created when the SO was created and confirmed in the same transaction. _Mail_track was not called and therefore the result was identical as if the SO was directly created in the progress subscription state. As no subscription_state update was detected, the log could not be created.
This issue does not happens in the UI but it could be observed with odoo shell:
before this commit:
```
In [1]: a = self.env['sale.order'].create({'partner_id': 1, 'user_id': 1, 'subscription_state': '1_draft', 'sale_order_template_id': 2, })
In [2]: a._onchange_sale_order_template_id()
In [3]: a.action_confirm()
Out[3]: True
In [4]: a.order_log_ids
Out[4]: sale.order.log()
```
After:
```
In [1]: a = self.env['sale.order'].create({'partner_id': 1, 'user_id': 1, 'subscription_state': '1_draft', 'sale_order_template_id': 2, })
In [2]: a._onchange_sale_order_template_id()
In [3]: a.action_confirm()
Out[3]: True
In [4]: a.order_log_ids
Out[4]: sale.order.log(384,)
```This fix ensures room booking presence updates are only sent after the system is properly ready to receive them. It prevents background timing errors that could affect automated checks and helps keep the room booking feature stable.
Original PR description
In the community counterpart of this PR, a debounce is added to the addition of bus channels in order to batch them as much as possible. The room module uses the `waitForSubscribe` bus helper but never awaits it which trigger errors in other tests. This PR fixes this issue. community: https://github.com/odoo/odoo/pull/175463
This fixes a display issue in the mass mailing editor where the snippet sidebar could slide under the control panel when using the Event Promo template at higher browser zoom levels. The sidebar now adjusts to the template height while scrolling, keeping the editor controls visible and easier to use.
Original PR description
How to reproduce: 1. create a new mailing. 2. from the existing available Mail Body templates, select Event Promo. 3. zoom In to around 125% or greater scale. 4. scroll the page to the end. Issue: 5.…
How to reproduce: 1. create a new mailing. 2. from the existing available Mail Body templates, select Event Promo. 3. zoom In to around 125% or greater scale. 4. scroll the page to the end. Issue: 5. as you scroll, you will notice the snippet sidebar stays sticky till a certain point, but as we reach the end of the template itself, and the page starts to scroll, the sidebar goes under the control panel. video of the issue --> https://www.awesomescreenshot.com/video/33360044?key=46734c8ba59b1144830c3939e24ed12f Reason: 7. in previous version (i.e. 17.0) the sidebar's top and bottom was dynamically controlled on every scroll. refer --- https://github.com/odoo/odoo/blob/17.0/addons/mass_mailing/static/src/js/mailing_mailing_view_form_full_width.js#L91-L96 8. we use `position: sticky` in the current version to achieve that outcome, but when the template itself starts to scroll, the stickiness disappears. Fix: 9. once the page has started scrolling we recalculate the height of the sidebar to match it with the height of the template. Task-4137980
Fixed a display issue in mass mailing templates where the editing sidebar could overlap the email content after returning to a template. This makes template editing more reliable and prevents layout confusion for users.
Original PR description
Previously, the has_snippets_sidebar class was only applied when clicking the template during creation. Now, the fix ensures that the class is correctly applied on load, preventing the body from overlapping with the sidebar when returning to the template. Task-4266339
Spreadsheet pivot formulas now show the available measures when a user enters an invalid measure. This helps users correct mistakes faster and reduces confusion when working with pivot reports.
Original PR description
Before this commit, applying a pivot formula with an invalid measure returns an error message without showing possible measures. This commit fixed that Task 3754942 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The FACe/Factura-e section on invoices now appears only when the related company is located in Spain. This avoids showing Spain-specific electronic invoicing fields to companies in other countries, reducing confusion for users.
Original PR description
We should show the FACe/Factura-e section on invoice when the related company is located in Spain. opw-4397651 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fixes a payment validation issue where incoming payments could be blocked by a requirement intended for outgoing payments. It helps avoid confusion and supports payment methods such as Italian RiBa that need a bank account for incoming money without treating it as an outgoing payment.
Original PR description
The `require_partner_bank_account` flag on the payment shouldn't require the `allow_out_payment` flag on it when the payment type is `inbound` as it leads to confusion. This generates an issue with the `l10n_it_riba` RiBa payment method. It requires the bank account, but the money is incoming, not outgoing. Enterprise PR: odoo/enterprise#77901 Task [link](https://www.odoo.com/odoo/project/967/tasks/4497749) task-4497749
This fix improves how invoice changes are protected from unintended automatic recalculations during updates. It helps keep accounting data consistent when invoices or invoice lines are created or modified.
Original PR description
Missing commit from the forward-port of https://github.com/odoo/odoo/pull/193528
Miscellaneous changes
During the creation of quality checks a potentially useless `search` was performed. With this commit, we will perform (indirectly) the search only if needed When method `_create_checks` is called, `quality.check` records are created one at the time. This can become slow wh en a lot of checks are created at once (ex: Bill of Material defined with steps "manual consumption" and used in a manufacturing order). Script used for tests: https://gist.github.com/emi-odoo/d4c6271363dfc3f2e4b7c5efa
Original PR description
During the creation of quality checks a potentially useless `search` was performed. With this commit, we will perform (indirectly) the search only if needed When method `_create_checks` is called,…
During the creation of quality checks a potentially useless `search` was performed. With this commit, we will perform (indirectly) the search only if needed When method `_create_checks` is called, `quality.check` records are created one at the time. This can become slow wh en a lot of checks are created at once (ex: Bill of Material defined with steps "manual consumption" and used in a manufacturing order). Script used for tests: https://gist.github.com/emi-odoo/d4c6271363dfc3f2e4b7c5efabfed5c1 Before: 3.51s (`_create_checks`) - 17493 queries (total queries of the script, not for the single operation)  After: 2.08s (`_create_checks`) - 16103 queries (total queries of the script, not for the single operation)  Comparison of the time taken by Confirming the MRP Order (using `time.process_time()`) | n_components | before (s) | after (s) | ratio | | --- | --- | --- | --- | | 1 | 0.074 | 0.073 | 0.988 | | 5 | 0.134 | 0.140 | 1.042 | | 10 | 0.216 | 0.187 | 0.862 | | 20 | 0.334 | 0.304 | 0.908 | | 50 | 0.736 | 0.600 | 0.816 | | 100 | 1.378 | 1.172 | 0.851 | | 200 | 2.739 | 2.374 | 0.867 | Forward-Port-Of: odoo/enterprise#66224 Forward-Port-Of: odoo/enterprise#65725
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create and confirm an MO for one unit of FP. - Go to the shopfoor app > open the instruction of your operation - Type a non-existing serial number in the search bar > Create "new_sn" > This opens a form view of the stock.lot model - Save and close the new stock.lot > Invalid operation: You
Original PR description
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create…
### Steps to reproduce:
- Create a storable product FP tracked by SN with a BOM:
- 1 Operation: - instruction: Register Production type (per product)
- 1 x Comp (storable product in stock)
- Create and confirm an MO for one unit of FP.
- Go to the shopfoor app > open the instruction of your operation
- Type a non-existing serial number in the search bar > Create "new_sn"
> This opens a form view of the stock.lot model
- Save and close the new stock.lot
> Invalid operation: You are not allowed to create or edit a lot or serial number for the components with the operation type
> "Manufacturing". To change this, go on the operation type and tick the box "Create New Lots/Serial Numbers for
> Components"
#### Expected behavior:
The invalid operation should not be raised as the "required" option concerns only componenets and not final products.
### Cause of the issue:
Creating a stock lot will first launch a call of the `_check_create`: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/stock/models/stock_lot.py#L150-L153 However, since this check does not verifies that the product for which we create the lot is indeed related to a component of the MO it will raise the invalid operation even for final products: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/mrp/models/stock_lot.py#L11-L17
### Issue 2:
Currently, the `quickCreate` ("Create *sn_name*") option of the lot field of te "register production" dialog calls a `name_create` that will set an error message in the logs as the product_id required field can not be provided neither in the vals or the context of the `name_create`. You then fall back on the same form dialog than the "Create and edit". The `quickCreate` option should therefore just be disabled.
Community: https://github.com/odoo/odoo/pull/193965
opw-4452747
---
Forward-Port-Of: odoo/enterprise#77265A standard such as RiBa that everyone calls RiBA should not have any invented translation like Payment Receipt (IT). Followup for the Ri.Ba. task: odoo/enterprise#74097 Documentation PR: odoo/documentation#11847 Task [link](https://www.odoo.com/odoo/project/967/tasks/4497749) task-4497749 Forward-Port-Of: odoo/enterprise#78886 Forward-Port-Of: odoo/enterprise#77991
Original PR description
A standard such as RiBa that everyone calls RiBA should not have any invented translation like Payment Receipt (IT). Followup for the Ri.Ba. task: odoo/enterprise#74097 Documentation PR: odoo/documentation#11847 Task [link](https://www.odoo.com/odoo/project/967/tasks/4497749) task-4497749 Forward-Port-Of: odoo/enterprise#78886 Forward-Port-Of: odoo/enterprise#77991
Before this commit, the leaderboard data is fetched even if we are sure the feature is disabled. This commit checks the feature is enabled before getting leaderboard data. task-4509858 Forward-Port-Of: odoo/enterprise#78858
Original PR description
Before this commit, the leaderboard data is fetched even if we are sure the feature is disabled. This commit checks the feature is enabled before getting leaderboard data. task-4509858 Forward-Port-Of: odoo/enterprise#78858
There might be little value in re-creating a template that a user has deleted. This can also trigger the model constraint, specially in smaller databases with only one Whatsapp account and one language installed when a standard template is deleted and a new one with the same name is created. To reproduce: - Install `whatsapp_account` - Delete the `Invoice` template - Create a Whatsapp account - Create a new template, call it `Invoice` and link to the account. - Upgrade the module T
Original PR description
There might be little value in re-creating a template that a user has deleted. This can also trigger the model constraint, specially in smaller databases with only one Whatsapp account and one language installed when a standard template is deleted and a new one with the same name is created. To reproduce: - Install `whatsapp_account` - Delete the `Invoice` template - Create a Whatsapp account - Create a new template, call it `Invoice` and link to the account. - Upgrade the module This will trigger the constraint: ``` psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "whatsapp_template_unique_name_account_template" DETAIL: Key (template_name, lang_code, wa_account_id)=(invoice, en, 1) already exists. ``` Forward-Port-Of: odoo/enterprise#78501
When creating a SOL on the fly from a project or a ticket, we try to match an existing product from what was typed in the field. However, we should be excluding recurring services Task-4354482 Forward-Port-Of: odoo/enterprise#74412
Original PR description
When creating a SOL on the fly from a project or a ticket, we try to match an existing product from what was typed in the field. However, we should be excluding recurring services Task-4354482 Forward-Port-Of: odoo/enterprise#74412
When creating a SOL on the fly from a project or a ticket, we try to match an existing product from what was typed in the field. However, we should be excluding recurring services Task-4354482 Forward-Port-Of: odoo/odoo#188309
Original PR description
When creating a SOL on the fly from a project or a ticket, we try to match an existing product from what was typed in the field. However, we should be excluding recurring services Task-4354482 Forward-Port-Of: odoo/odoo#188309
Fixup for this commit https://github.com/odoo/odoo/commit/c9cefd88bb6f38f8fd504b7c4a8abf263aa1aa4b A test in 17.4 highlighted a issue with the use of with_context which was overriding it completely instead of adding to it. opw-4310781 Forward-Port-Of: odoo/odoo#196901
Original PR description
Fixup for this commit https://github.com/odoo/odoo/commit/c9cefd88bb6f38f8fd504b7c4a8abf263aa1aa4b A test in 17.4 highlighted a issue with the use of with_context which was overriding it completely instead of adding to it. opw-4310781 Forward-Port-Of: odoo/odoo#196901
The state changes right check was only done on specific method but it wasn't check at write level. Which allowed to bypass it. The record rule on hr_expense_user without a check on the state is in draft allow to change data on approved expense sheets. Forward-Port-Of: odoo/odoo#180400 Forward-Port-Of: odoo/odoo#165663
Original PR description
The state changes right check was only done on specific method but it wasn't check at write level. Which allowed to bypass it. The record rule on hr_expense_user without a check on the state is in draft allow to change data on approved expense sheets. Forward-Port-Of: odoo/odoo#180400 Forward-Port-Of: odoo/odoo#165663
Revert changes from [commit] due to `m.facebook.com` using 'X-Frame-Options' header set to 'deny', which prevented iframe embedding across domains. META has now fixed this issue, so this PR restores the snippet's visibility on mobile devices. [commit]: https://github.com/odoo/odoo/commit/588f910da03d6284a57c2fab8fd042ef3169666f task-4507102 Forward-Port-Of: odoo/odoo#195853 Forward-Port-Of: odoo/odoo#194843
Original PR description
Revert changes from [commit] due to `m.facebook.com` using 'X-Frame-Options' header set to 'deny', which prevented iframe embedding across domains. META has now fixed this issue, so this PR restores the snippet's visibility on mobile devices. [commit]: https://github.com/odoo/odoo/commit/588f910da03d6284a57c2fab8fd042ef3169666f task-4507102 Forward-Port-Of: odoo/odoo#195853 Forward-Port-Of: odoo/odoo#194843
__Current behavior before commit:__ If an unexpected error that has no body is thrown inside `printHtml`, the popup shows "undefinedDo you want to print using the web printer?" and nothing is written in the console, making it impossible to troubleshoot. __Description of the fix:__ Don't print "undefined" in the popup if the error has no body but write the error in the console. opw-4322339 Forward-Port-Of: odoo/odoo#194985
Original PR description
__Current behavior before commit:__ If an unexpected error that has no body is thrown inside `printHtml`, the popup shows "undefinedDo you want to print using the web printer?" and nothing is written in the console, making it impossible to troubleshoot. __Description of the fix:__ Don't print "undefined" in the popup if the error has no body but write the error in the console. opw-4322339 Forward-Port-Of: odoo/odoo#194985
__Current behavior before commit:__ Sometimes when a Worldline terminal makes a payment with Edenred or Sodexo, it creates a ticket with special ascii characters like `0x0E` that are not supposed to be printed. Some of those characters make the [`createImage`][1] method throw an error with the `onerror` Event. __Description of the fix:__ Added the `sanitizeNodeText` function to remove all problematic ascii characters that should not be printed anyway. Added a test to make sure `htmlToCanva
Original PR description
__Current behavior before commit:__ Sometimes when a Worldline terminal makes a payment with Edenred or Sodexo, it creates a ticket with special ascii characters like `0x0E` that are not supposed to be printed. Some of those characters make the [`createImage`][1] method throw an error with the `onerror` Event. __Description of the fix:__ Added the `sanitizeNodeText` function to remove all problematic ascii characters that should not be printed anyway. Added a test to make sure `htmlToCanvas` can handle all ascii characters without crashing. opw-4322339 [1]:https://github.com/odoo/odoo/blob/a98e802976f6798f3aea07231a366fbcd8002ce2/addons/point_of_sale/static/src/app/utils/html-to-image.js#L217 Forward-Port-Of: odoo/odoo#195004
Repro steps: - Add `Tax String` to `Product Page Extra Fields` for one of your websites - Add taxes from a company that isn't linked to that website for one of your products - Open that product's product page in eCommerce - You get an access error The issue is that we try to read the taxes for all companies when opening the product page. Instead, we should only read the taxes for the current company. opw-4435721 Forward-Port-Of: odoo/odoo#194881
Original PR description
Repro steps: - Add `Tax String` to `Product Page Extra Fields` for one of your websites - Add taxes from a company that isn't linked to that website for one of your products - Open that product's product page in eCommerce - You get an access error The issue is that we try to read the taxes for all companies when opening the product page. Instead, we should only read the taxes for the current company. opw-4435721 Forward-Port-Of: odoo/odoo#194881
This error occurs when a user does not enter a Webhook Secret. As a result, when processing the payment, the missing secret causes the verification to fail, leading to a payment failure. - Install the `eCommerce` module without demo data and with Indian localization. - Install `Razorpay payment provider` and activate `developer mode`. - Add `Key ID` and `Key Secret` in Razorpay payment `provider`. - Set up webhook in Razorpay dashboard with a random `Webhook Secret`. - Go to the `website`
Original PR description
This error occurs when a user does not enter a Webhook Secret. As a result, when processing the payment, the missing secret causes the verification to fail, leading to a payment failure. - Install…
This error occurs when a user does not enter a Webhook Secret. As a result, when processing the payment, the missing secret causes the verification to fail, leading to a payment failure. - Install the `eCommerce` module without demo data and with Indian localization. - Install `Razorpay payment provider` and activate `developer mode`. - Add `Key ID` and `Key Secret` in Razorpay payment `provider`. - Set up webhook in Razorpay dashboard with a random `Webhook Secret`. - Go to the `website`, add the product to the cart, and proceed to payment using `UPI`.` `Error: 'bool' object has no attribute 'encode'` This issue occurs because the Webhook Secret is missing, returning False and causing payment verification to fail. This commit solves the error by handling missing `Webhook Secret` values by logging a warning and skipping the signature check instead of returning a False. Sentry: 6208134651 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#196125
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create and confirm an MO for one unit of FP. - Go to the shopfoor app > open the instruction of your operation - Type a non-existing serial number in the search bar > Create "new_sn" > This opens a form view of the stock.lot model - Save and close the new stock.lot > Invalid operation: You
Original PR description
### Steps to reproduce: - Create a storable product FP tracked by SN with a BOM: - 1 Operation: - instruction: Register Production type (per product) - 1 x Comp (storable product in stock) - Create…
### Steps to reproduce:
- Create a storable product FP tracked by SN with a BOM:
- 1 Operation: - instruction: Register Production type (per product)
- 1 x Comp (storable product in stock)
- Create and confirm an MO for one unit of FP.
- Go to the shopfoor app > open the instruction of your operation
- Type a non-existing serial number in the search bar > Create "new_sn"
> This opens a form view of the stock.lot model
- Save and close the new stock.lot
> Invalid operation: You are not allowed to create or edit a lot or serial number for the components with the operation type
> "Manufacturing". To change this, go on the operation type and tick the box "Create New Lots/Serial Numbers for
> Components"
#### Expected behavior:
The invalid operation should not be raised as the "required" option concerns only componenets and not final products.
### Cause of the issue:
Creating a stock lot will first launch a call of the `_check_create`: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/stock/models/stock_lot.py#L150-L153 However, since this check does not verifies that the product for which we create the lot is indeed related to a component of the MO it will raise the invalid operation even for final products: https://github.com/odoo/odoo/blob/c25d71f14fa168807f07cd88bed805d15db8add5/addons/mrp/models/stock_lot.py#L11-L17
### Issue 2:
Currently, the `quickCreate` ("Create *sn_name*") option of the lot field of te "register production" dialog calls a `name_create` that will set an error message in the logs as the product_id required field can not be provided neither in the vals or the context of the `name_create`. You then fall back on the same form dialog than the "Create and edit". The `quickCreate` option should therefore just be disabled.
Enterprise: https://github.com/odoo/enterprise/pull/77265
opw-4452747
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: odoo/odoo#193965if they use import export or any automated action that write same journal then it's take new number. here assume that journal_id is only change on draft and if posted then it's raise error but not consider what is same journal_id come to write. 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#19
Original PR description
if they use import export or any automated action that write same journal then it's take new number. here assume that journal_id is only change on draft and if posted then it's raise error but not consider what is same journal_id come to write. 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#196777
Scenario: set a menu to be visible only to a group you don't have Result: the menu is not shown in the list of menu on the group form view Why: in 17.0, web_read was added that is adding a search for ordering results of x2many according to order in specification. This is interfering with custom code of ir.ui.menu that is filtering out menu that are not visible (in the interface) to you. Fix: add context key that bypass the ir.ui.menu filtering in the res.groups window action. opw-4376374 For
Original PR description
Scenario: set a menu to be visible only to a group you don't have Result: the menu is not shown in the list of menu on the group form view Why: in 17.0, web_read was added that is adding a search for ordering results of x2many according to order in specification. This is interfering with custom code of ir.ui.menu that is filtering out menu that are not visible (in the interface) to you. Fix: add context key that bypass the ir.ui.menu filtering in the res.groups window action. opw-4376374 Forward-Port-Of: odoo/odoo#195329
This is a backport of 183741 which missed earlier versions where attendance geolocation is available. Forward-Port-Of: odoo/odoo#193393
Original PR description
This is a backport of 183741 which missed earlier versions where attendance geolocation is available. Forward-Port-Of: odoo/odoo#193393
In the survey stats, the number of votes for a multiple choice answer displayed the label "Votes" without it being translatable. This commit makes it translatable. [task-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/odoo#196856 Forward-Port-Of: odoo/odoo#196704
Original PR description
In the survey stats, the number of votes for a multiple choice answer displayed the label "Votes" without it being translatable. This commit makes it translatable. [task-4421055](https://www.odoo.com/odoo/project.task/4421055) Forward-Port-Of: odoo/odoo#196856 Forward-Port-Of: odoo/odoo#196704