Tuesday, January 14, 2025
37 changes · saas-18.1
Enhancements to existing features
This update reorganizes and strengthens automated checks for project-related email handling, including acknowledgements, replies, and copied recipients. It helps reduce the risk of future changes breaking customer-facing email flows, while also cleaning up related mail test coverage.
Original PR description
Purpose is to have mail-gateway and notifications related tests into a specific file, easing future changes and checks. New tests are taken from 'flow' tests, and improved using mail helpers. This allows more in-depth check on the content of generated emails, notably for acknowledgement emails. A more complete email flow is added, including CC emails, replies, ... Some tests are also merged, as they were mainly duplicate tests with some changes that are integrated into bigger tests. Backport of odoo/odoo@50ce674b0f8f389189586d08ed9d676791df2d16 so that tests are also added in a stable version where they won't be modified by new features. Related to Task-4464566: [mail] Cover project/helpdesk gateway features Prepares Task-4273479: [mail] Stop autofollow madness ! Prepares Task-4273479: [mail] Email-like recipients
The live chat chatbot now ends a multi-line question step when the visitor does not provide additional input. This helps conversations move forward more smoothly and avoids users getting stuck waiting for the bot to continue.
Original PR description
task-4433289
Helpdesk email handling tests were reorganized and expanded to better validate customer acknowledgements, replies, CC handling, and notifications. This reduces the risk of regressions in support email workflows and prepares the product for upcoming mail recipient changes.
Original PR description
Purpose is to have mail-gateway and notifications related tests into a specific file, easing future changes and checks. New tests are taken from 'flow' tests, and improved using mail helpers. This allows more in-depth check on the content of generated emails, notably for acknowledgement emails. A more complete email flow is added, including CC emails, replies, ... Some tests are also merged, as they were mainly duplicate tests with some changes that are integrated into bigger tests. Backport of odoo/odoo@f86a6afd43bfdbb0910727b9a4febb459b740688 Related to Task-4464566: [mail] Cover project/helpdesk gateway features Prepares Task-4273479: [mail] Stop autofollow madness ! Prepares Task-4273479: [mail] Email-like recipients
Resolved issues and error corrections
This fix improves how category buttons are arranged in the Point of Sale screen so long category lists no longer cause labels to be cut off. It helps cashiers read and select product categories more reliably, especially on screens with many categories.
Original PR description
With Commit[1] we aimed to apply a fix to prevent an horizontal scroll on the screen when the list of category is extremely long. While this solved the issue, it introduces a new one on category labels which were sometimes cut due to the size of the grid elements. | saas-18.1 | This PR | |--------|--------| | <img alt="image" src="https://github.com/user-attachments/assets/d471ef51-502d-496c-8b84-7ec1e19d01af" /> | <img alt="image" src="https://github.com/user-attachments/assets/9870287e-17d1-47b3-a92c-8165f811a0e3" /> | It was also setting the same class twice inside a conditional, which was not useful. With this commit, we apply a `d-flex flex-wrap` to solve both issues. Commit[1]: df97b2966436cd104bd806cb66786824f66fa567 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Before this commit the `LIVE` badge on the minimized call participant card had some styling issues. This was caused by missing padding on the related div tag and non-transparent background on the parent tag. This commit fixes the issue by introducing some padding and removing the css class that adds background opacity. Before:    After:   Forward-Port-Of: odoo/odoo#193516
The receipt screen now avoids calling a restaurant-only function when the restaurant app is not installed. This prevents errors for businesses using the standard Point of Sale setup and keeps checkout receipts working reliably.
Original PR description
isContinueSplitting function is defined in pos_restaurant, but is being called in point_of_sale. This gives us errors when pos_restaurant is not installed. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This button is only useful for marking payments as paid when the matching doesn't do it automatically, which can only happen if there is no reconciliation being done, which only happens when there is no outstanding account used. opw-4445889 Forward-Port-Of: odoo/odoo#192563
Original PR description
This button is only useful for marking payments as paid when the matching doesn't do it automatically, which can only happen if there is no reconciliation being done, which only happens when there is no outstanding account used. opw-4445889 Forward-Port-Of: odoo/odoo#192563
Before this PR, operators could be stuck inside a "ghost call," meaning that they had incorrectly closed RTC sessions. This is an issue with the fact that "in call" operators cannot be assigned a new live chat. This PR cleanup rtc session before trying to find an operator task-4440897, task-4453597 Forward-Port-Of: odoo/odoo#193535
Original PR description
Before this PR, operators could be stuck inside a "ghost call," meaning that they had incorrectly closed RTC sessions. This is an issue with the fact that "in call" operators cannot be assigned a new live chat. This PR cleanup rtc session before trying to find an operator task-4440897, task-4453597 Forward-Port-Of: odoo/odoo#193535
Steps: - Install project_todo - Create a second company - Create a project - Link the project to a company - Setup a default value for task.project_id with your new project (1) - Try to open project_todo Actual result: - Error due to company id - can't adapt type 'res.company' Expected result: - No error - Welcome task is created and project is opened opw-4465277 Caused by https://github.com/odoo/odoo/pull/173625 Forward-Port-Of: odoo/odoo#193359
Original PR description
Steps: - Install project_todo - Create a second company - Create a project - Link the project to a company - Setup a default value for task.project_id with your new project (1) - Try to open project_todo Actual result: - Error due to company id - can't adapt type 'res.company' Expected result: - No error - Welcome task is created and project is opened opw-4465277 Caused by https://github.com/odoo/odoo/pull/173625 Forward-Port-Of: odoo/odoo#193359
In the macro class, for each step, we wait 50ms to see if a mutation occurs and then look for the trigger of the step in the DOM. So, if a step of the macro does not have a trigger, we do not look for a trigger and we only do an action, there is no reason to wait for a mutation to occur in the DOM. So, we can continue the macro directly. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have sig
Original PR description
In the macro class, for each step, we wait 50ms to see if a mutation occurs and then look for the trigger of the step in the DOM. So, if a step of the macro does not have a trigger, we do not look for a trigger and we only do an action, there is no reason to wait for a mutation to occur in the DOM. So, we can continue the macro directly. 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#192015
Versions -------- - 18.0+ Steps ----- 1. Create a promotion to apply a fixed discount to an order; 2. create a promotion to apply a fixed discount to a specific product; 3. create a order with a taxed product eligible for the 2nd discount; 4. apply the first promotion; 5. apply the second promotion. Issue ----- Traceback: > KeyError: account.tax(1,) Cause ----- Commit db12319e8b3b changed the way taxes get handled for discounts on the order total. They no longer automatical
Original PR description
Versions -------- - 18.0+ Steps ----- 1. Create a promotion to apply a fixed discount to an order; 2. create a promotion to apply a fixed discount to a specific product; 3. create a order with a…
Versions -------- - 18.0+ Steps ----- 1. Create a promotion to apply a fixed discount to an order; 2. create a promotion to apply a fixed discount to a specific product; 3. create a order with a taxed product eligible for the 2nd discount; 4. apply the first promotion; 5. apply the second promotion. Issue ----- Traceback: > KeyError: account.tax(1,) Cause ----- Commit db12319e8b3b changed the way taxes get handled for discounts on the order total. They no longer automatically get a tax applied to them. This causes a problem in the `_discountable_specific` method, which builds a `dict` using taxes of discount lines as keys to calculate discountable amounts. Because the existing reward doesn't have a tax, this dict only has an `account.tax()` key, leading to a `KeyError` when trying to get discountable amount associated with the product-specific reward's taxes. Solution -------- Change the `dict` to a `defaultdict` which returns `0` for non-existing keys. opw-4419764 Forward-Port-Of: odoo/odoo#193401
With the increasing number of snippets and their potential option classes, it became even more important to be able to search for them quickly while reviewing / testing features (... we really would like to restore the search for inner snippets too if it was accepted ...). This commit improves the snippet search. If the search starts by 's_', it will: - Also match any snippet whose root or child nodes have a class that begins by the search term. - For those extra matches, sort them by:
Original PR description
With the increasing number of snippets and their potential option classes, it became even more important to be able to search for them quickly while reviewing / testing features (... we really would like to restore the search for inner snippets too if it was accepted ...).
This commit improves the snippet search. If the search starts by 's_', it will:
- Also match any snippet whose root or child nodes have a class that begins by the search term.
- For those extra matches, sort them by:
- Exact XMLID match first
- Exact class match on the root node first
- Partial class match on the root node first
Forward-Port-Of: odoo/odoo#191829Expiration dates on loyalty cards are available to be used, but do notdo anything. Added a validation error when expiration dates are added to loyalty cards to warn about this. opw-3997339 Forward-Port-Of: odoo/odoo#171453
Original PR description
Expiration dates on loyalty cards are available to be used, but do notdo anything. Added a validation error when expiration dates are added to loyalty cards to warn about this. opw-3997339 Forward-Port-Of: odoo/odoo#171453
Before this commit: the bg color of a table cell is set to a fixed value when selected After this commit: the selection will have a blue overlay color effect on the selected cells with bg color task-4398980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192039 Forward-Port-Of: odoo/odoo#191366
Original PR description
Before this commit: the bg color of a table cell is set to a fixed value when selected After this commit: the selection will have a blue overlay color effect on the selected cells with bg color task-4398980 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192039 Forward-Port-Of: odoo/odoo#191366
Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio - Unset the color => fields[fieldMapping.color] is undefined Cause of the issue ================== We have a field that has the color attribute with a value of color. ```xml <field name="worksheet_template_id" attrs="{'invisible': [('worksheet_template_id', '=', False)]}" filters="1" color="color"/> ``` `shouldFetchColor` checks if th
Original PR description
Steps to reproduce
==================
- Install industry_fsm,web_studio
- Go to Field Service
- Switch to the calendar view
- Open studio
- Unset the color
=> fields[fieldMapping.color] is undefined
Cause of the issue
==================
We have a field that has the color attribute with a value of color.
```xml
<field name="worksheet_template_id" attrs="{'invisible': [('worksheet_template_id', '=', False)]}" filters="1" color="color"/>
```
`shouldFetchColor` checks if the filter color is the same one as the calendar record color.
Solution
========
Since it's possible to have a color filter without a record color, we should fetch the filter colors in that case.
opw-4443497
Forward-Port-Of: odoo/odoo#193370
Forward-Port-Of: odoo/odoo#192334Before this commit, if a payment method requiring customer identification was used for an order in Point of Sale but the order was not immediately invoiced, closing the session and later invoicing the order in a new session would result in the invoice being marked as unpaid. opw-4292231 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187759
Original PR description
Before this commit, if a payment method requiring customer identification was used for an order in Point of Sale but the order was not immediately invoiced, closing the session and later invoicing the order in a new session would result in the invoice being marked as unpaid. opw-4292231 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#187759
Steps to reproduce: - Enter website edit mode. - Drag and drop a "Products" dynamic snippet onto the page. - Drag and drop a "Search" snippet onto the page. - Save the page. - Perform a search for "dynamic" using the search input. - Bug: The dynamic snippet alert message appears in the results. The same issue occurs with the "Embed code" snippet, where text inside "<script>" elements appears in search results. With this commit, elements like "css_non_editable_mode_hidden" and "<scr
Original PR description
Steps to reproduce: - Enter website edit mode. - Drag and drop a "Products" dynamic snippet onto the page. - Drag and drop a "Search" snippet onto the page. - Save the page. - Perform a search for "dynamic" using the search input. - Bug: The dynamic snippet alert message appears in the results. The same issue occurs with the "Embed code" snippet, where text inside "<script>" elements appears in search results. With this commit, elements like "css_non_editable_mode_hidden" and "<script>" are excluded from search results. opw-4420622 Forward-Port-Of: odoo/odoo#192029
Before, the rounding was made by counting twice the same base amount that was leading to an extra "delta_base_amount_currency". See the test in the commit. opw-4425380 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192484
Original PR description
Before, the rounding was made by counting twice the same base amount that was leading to an extra "delta_base_amount_currency". See the test in the commit. opw-4425380 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192484
Before this commit, validating a split bill that contains a combo product would result in a key error. opw-4416406 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192737 Forward-Port-Of: odoo/odoo#192384
Original PR description
Before this commit, validating a split bill that contains a combo product would result in a key error. opw-4416406 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#192737 Forward-Port-Of: odoo/odoo#192384
Two lines that were missing from the "REAGYP - Agricultura" Fiscal Position Tax Mapping have been added. task-4342206 Forward-Port-Of: odoo/odoo#193156 Forward-Port-Of: odoo/odoo#192359
Original PR description
Two lines that were missing from the "REAGYP - Agricultura" Fiscal Position Tax Mapping have been added. task-4342206 Forward-Port-Of: odoo/odoo#193156 Forward-Port-Of: odoo/odoo#192359
The function checkForUndeterminisms in the TourStepAutomatic class throws an error in the case where an indeterminism is found. However, in the TourAutomatic class, we used this.throwError which throws the error but does not stop the macro (Does not go through the stop method of the Macro class). As a result, the observable is not disconnected and the macro is not stopped properly. In this commit, we make sure that the macro is stopped properly. Description of the issue/feature this PR addre
Original PR description
The function checkForUndeterminisms in the TourStepAutomatic class throws an error in the case where an indeterminism is found. However, in the TourAutomatic class, we used this.throwError which throws the error but does not stop the macro (Does not go through the stop method of the Macro class). As a result, the observable is not disconnected and the macro is not stopped properly. In this commit, we make sure that the macro is stopped properly. 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#192895
Currently the folllowing fields are not set / given in the SII / FaturaE XMLs respectively: * `FechaOperacion` (l10n_es_edi_sii) * `OperationDate` (l10n_es_edi_facturae) After this commit they will give the delivery date in case the delivery date is different from the invoice date. This is basically the same as it was done for TicketBat (l10n_es_edi_tbai) in commit 1451f589895f0867cd40add66e5e6bcbb5ba4a6e already. opw-4367470 Enterprise PR: https://github.com/odoo/enterprise/pu
Original PR description
Currently the folllowing fields are not set / given in the SII / FaturaE XMLs respectively: * `FechaOperacion` (l10n_es_edi_sii) * `OperationDate` (l10n_es_edi_facturae) After this commit they will give the delivery date in case the delivery date is different from the invoice date. This is basically the same as it was done for TicketBat (l10n_es_edi_tbai) in commit 1451f589895f0867cd40add66e5e6bcbb5ba4a6e already. opw-4367470 Enterprise PR: https://github.com/odoo/enterprise/pull/76523 Forward-Port-Of: odoo/odoo#193435 Forward-Port-Of: odoo/odoo#192467
pos*: point_of_sale, pos_hr, pos_loyalty, pos_restaurant, pos_self_order In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184138
Original PR description
pos*: point_of_sale, pos_hr, pos_loyalty, pos_restaurant, pos_self_order In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#184138
… Jan 2025 task-4409214 Forward-Port-Of: odoo/enterprise#76274
Original PR description
… Jan 2025 task-4409214 Forward-Port-Of: odoo/enterprise#76274
Steps to reproduce: - activate analytic accounting in the Accounting settings - open the profit and loss - create a financial budget with the "budget" filter - select an analytic account -> The report is completely messed up because the budget feature is not able to handle other columns in the report. This commit solves the issue by "lowering" the budget headers on the same level of header than analytic headers. opw-4298672 Forward-Port-Of: odoo/enterprise#76692
Original PR description
Steps to reproduce: - activate analytic accounting in the Accounting settings - open the profit and loss - create a financial budget with the "budget" filter - select an analytic account -> The report is completely messed up because the budget feature is not able to handle other columns in the report. This commit solves the issue by "lowering" the budget headers on the same level of header than analytic headers. opw-4298672 Forward-Port-Of: odoo/enterprise#76692
…endar editor Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio => The color value is empty, it should be "Color" Cause of the issue ================== We only keep many2one and selection fields, but in this case, it's an integer field. Solution ======== Here's a few example where integer field are used: [planning_view_calendar] and [project_task_view_calendar_fsm_worksheet]. => Kee
Original PR description
…endar editor Steps to reproduce ================== - Install industry_fsm,web_studio - Go to Field Service - Switch to the calendar view - Open studio => The color value is empty, it should be "Color" Cause of the issue ================== We only keep many2one and selection fields, but in this case, it's an integer field. Solution ======== Here's a few example where integer field are used: [planning_view_calendar] and [project_task_view_calendar_fsm_worksheet]. => Keep integer fields --- [planning_view_calendar]: https://github.com/odoo/enterprise/blob/c37ed1a684fd9b91e394b7b14f282b9ebabcb751/planning/views/planning_views.xml#L332 [project_task_view_calendar_fsm_worksheet]: https://github.com/odoo/enterprise/blob/3205a82c4616b969b87aa2f6d05a2da636688037/industry_fsm_report/views/project_views.xml#L29 opw-4443497 Forward-Port-Of: odoo/enterprise#76789 Forward-Port-Of: odoo/enterprise#76454
Forward-Port-Of: odoo/enterprise#77096
Original PR description
Forward-Port-Of: odoo/enterprise#77096
pos*: pos_blackbox_be, pos_iot, pos_restaurant_preparation_display In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. A summary of the changes since last version: - QR ordering: QR code ordering is available without online payment. Just a simple ordering configuration. - Price can be changed: The price of a product can be changed in the cart. Forward-Port-Of: odoo/enterprise#72209
Original PR description
pos*: pos_blackbox_be, pos_iot, pos_restaurant_preparation_display In this commit, we adapt the point of sale modules to be compliant with the belgian restaurant certification. A summary of the changes since last version: - QR ordering: QR code ordering is available without online payment. Just a simple ordering configuration. - Price can be changed: The price of a product can be changed in the cart. Forward-Port-Of: odoo/enterprise#72209
Due to [317c781bd917](https://github.com/odoo/odoo/pull/192015) commit, the tour PreparationDisplayPaymentNotCancelDisplayTour is faster. This causes behavior changes in the turns. We need to add steps to ensure that the triggers for these are present in the DOM before continuing the turn. Forward-Port-Of: odoo/enterprise#77045
Original PR description
Due to [317c781bd917](https://github.com/odoo/odoo/pull/192015) commit, the tour PreparationDisplayPaymentNotCancelDisplayTour is faster. This causes behavior changes in the turns. We need to add steps to ensure that the triggers for these are present in the DOM before continuing the turn. Forward-Port-Of: odoo/enterprise#77045
Currently * "Fecha Expedición" = accounting date * "Fecha Operación" = invoice date (only set if different from accounting date) After this commit * "Fecha Expedición" = invoice date * "Fecha Operación" = delivery date (only set if different from invoice date) This is the same way the fields are handled in the spanish EDIs too (see related community PR). opw-4367470 Community PR: https://github.com/odoo/odoo/pull/192467 Forward-Port-Of: odoo/enterprise#77051 Forward-Port
Original PR description
Currently * "Fecha Expedición" = accounting date * "Fecha Operación" = invoice date (only set if different from accounting date) After this commit * "Fecha Expedición" = invoice date * "Fecha Operación" = delivery date (only set if different from invoice date) This is the same way the fields are handled in the spanish EDIs too (see related community PR). opw-4367470 Community PR: https://github.com/odoo/odoo/pull/192467 Forward-Port-Of: odoo/enterprise#77051 Forward-Port-Of: odoo/enterprise#76523
Server Actions =========== - Rename Action menu to "Actions on select" - Add an Actions creation in Actions menu (cog wheel) - Redirect to Server Actions Automations ========== - Add an Automations menu in Documents Cog Menu, below Actions on select - If base_automations is not installed -> propose to upgrade to Studio - If base_automations is installed -> redirect to Automations rules lighten as in CRM In the context of providing a partially pre-filled automation rule form
Original PR description
Server Actions =========== - Rename Action menu to "Actions on select" - Add an Actions creation in Actions menu (cog wheel) - Redirect to Server Actions Automations ========== - Add an Automations menu in Documents Cog Menu, below Actions on select - If base_automations is not installed -> propose to upgrade to Studio - If base_automations is installed -> redirect to Automations rules lighten as in CRM In the context of providing a partially pre-filled automation rule form for the target folder, we change the `folder_id` label from "Parent folder" to "Folder". task-4334749 Forward-Port-Of: odoo/enterprise#75719
Display commission of current company only Allow sale user to edit the forecast value Various UI improvements taskid: 4452731 Forward-Port-Of: odoo/enterprise#76546
Original PR description
Display commission of current company only Allow sale user to edit the forecast value Various UI improvements taskid: 4452731 Forward-Port-Of: odoo/enterprise#76546
When a subscription has the require_payment payment flag and no payment token, we will send a reminder to pay by mail. No automatic invoice will be created. Before this commit, when the SO is in this situation, no visual aid will help. taskid: 4367794 Forward-Port-Of: odoo/enterprise#74911
Original PR description
When a subscription has the require_payment payment flag and no payment token, we will send a reminder to pay by mail. No automatic invoice will be created. Before this commit, when the SO is in this situation, no visual aid will help. taskid: 4367794 Forward-Port-Of: odoo/enterprise#74911
As of now the gantt popover delete button is added through gantt-popover template which is making it harder to extend its functionality. In this PR we move the button to the ganttPopoverProps. We can pass the button through JS side, thus being to extend it's functionality of reccurence deletion. Made a dedicated hook function to combine the logic used in both form and gantt view in reccurence deletion of shifts. The unschedule gantt popover button is migrated to JS side to preserve the
Original PR description
As of now the gantt popover delete button is added through gantt-popover template which is making it harder to extend its functionality. In this PR we move the button to the ganttPopoverProps. We can pass the button through JS side, thus being to extend it's functionality of reccurence deletion. Made a dedicated hook function to combine the logic used in both form and gantt view in reccurence deletion of shifts. The unschedule gantt popover button is migrated to JS side to preserve the order of buttons in gantt popover. task-4224792 Forward-Port-Of: odoo/enterprise#71759
Before this commit: When the user clicks on the studio icon just after opening any app before its view gets loaded, the traceback will occur because the `get_view` method has not yet loaded. After this commit: Traceback will not occur. Task-4348166 Forward-Port-Of: odoo/enterprise#77043 Forward-Port-Of: odoo/enterprise#75881
Original PR description
Before this commit: When the user clicks on the studio icon just after opening any app before its view gets loaded, the traceback will occur because the `get_view` method has not yet loaded. After this commit: Traceback will not occur. Task-4348166 Forward-Port-Of: odoo/enterprise#77043 Forward-Port-Of: odoo/enterprise#75881
An error occurs when the system tries to access single values from multiple records at [1]. Link [1]: https://github.com/odoo/enterprise/blob/2e1af04e36fcbdcd11e3a7e2994673b2c4a5cf85/social_youtube/models/res_config_settings.py#L19 Traceback On Sentry: ``` ValueError: Expected singleton: res.config.settings(105, 106) File "odoo/http.py", line 2366, in __call__ response = request._serve_db() File "odoo/http.py", line 1894, in _serve_db return self._transactioning( Fil
Original PR description
An error occurs when the system tries to access single values from multiple records at [1]. Link [1]:…
An error occurs when the system tries to access single values from multiple records at [1].
Link [1]: https://github.com/odoo/enterprise/blob/2e1af04e36fcbdcd11e3a7e2994673b2c4a5cf85/social_youtube/models/res_config_settings.py#L19
Traceback On Sentry:
```
ValueError: Expected singleton: res.config.settings(105, 106)
File "odoo/http.py", line 2366, in __call__
response = request._serve_db()
File "odoo/http.py", line 1894, in _serve_db
return self._transactioning(
File "odoo/http.py", line 1957, in _transactioning
return service_model.retrying(func, env=self.env)
File "odoo/service/model.py", line 137, in retrying
result = func()
File "odoo/http.py", line 1924, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "odoo/http.py", line 2171, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "odoo/addons/base/models/ir_http.py", line 329, in _dispatch
result = endpoint(**request.params)
File "odoo/http.py", line 727, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "addons/web/controllers/dataset.py", line 35, in call_kw
return call_kw(request.env[model], method, args, kwargs)
File "odoo/api.py", line 517, in call_kw
result = getattr(recs, name)(*args, **kwargs)
File "odoo/models.py", line 6090, in search_read
return records._read_format(fnames=fields, **read_kwargs)
File "odoo/models.py", line 4032, in _read_format
vals[name] = convert(record[name], record, use_display_name)
File "odoo/models.py", line 6999, in __getitem__
return self._fields[key].__get__(self)
File "odoo/fields.py", line 1291, in __get__
self.compute_value(recs)
File "odoo/fields.py", line 1473, in compute_value
records._compute_field_value(self)
File "odoo/models.py", line 5238, in _compute_field_value
fields.determine(field.compute, self)
File "odoo/fields.py", line 110, in determine
return needle(*args)
File "home/odoo/src/enterprise/18.0/social_youtube/models/res_config_settings.py", line 19, in _compute_youtube_oauth_client_id
if self.env.user.has_group('social.group_social_manager') and self.youtube_use_own_account:
File "odoo/fields.py", line 1232, in __get__
record.ensure_one()
File "odoo/models.py", line 6212, in ensure_one
raise ValueError("Expected singleton: %s" % self)
```
To resolve this issue, Use an iteration(for loop) to iterate records one by one.
Sentry-6200420369
Forward-Port-Of: odoo/enterprise#76588This commit https://github.com/odoo/enterprise/commit/49d19b63d8e6ea44fdeeb1023d962191c6897e24 is missing optional chaining for `name` as `order.account_move?.l10n_latam_document_type_id` can be undefined. Steps to reproduce: - Install l10n_cl - Select the CL Company - Go to POS - Select products - Change the client to Blanco Martin & Asociados EIRL (has all the information for l10n_cl) - Click on "payment" - Select any payment method - Select the option "Invoice" - Validate - Con
Original PR description
This commit https://github.com/odoo/enterprise/commit/49d19b63d8e6ea44fdeeb1023d962191c6897e24 is missing optional chaining for `name` as `order.account_move?.l10n_latam_document_type_id` can be undefined. Steps to reproduce: - Install l10n_cl - Select the CL Company - Go to POS - Select products - Change the client to Blanco Martin & Asociados EIRL (has all the information for l10n_cl) - Click on "payment" - Select any payment method - Select the option "Invoice" - Validate - Console error opw-4455627 Forward-Port-Of: odoo/enterprise#76798