Daily updates from Odoo
Friday, July 26, 2024
24 changes · master
Enhancements to existing features
Warehouse users can now keep the device camera open while scanning multiple barcodes, instead of reopening it after every scan. The Barcode app also gets a refreshed layout with easier line deletion, visible product images, and manual barcode entry moved into the actions menu.
Original PR description
**[IMP] stock_barcode: continuous scanner** > Before this commit, when the user uses the device camera to scan a barcode, the camera video was opened in a dialog and once a barcode was scanned, the dialog was closed, making the process laborious for the user if they want to scan multiple barcodes one after the other. With this commit, the camera stay opened in the app, letting the user to scan barcodes until they close the camera. > > The system parameter `stock_barcode.delay_between_scan` let the user configure the delay between each scan. If not set, 2000 ms will be used by default. > > The input to manually entered barcode was moved in the operation's actions menu. Community PR: odoo/odoo#174236 [task-4058325](https://www.odoo.com/odoo/project.task/4058325?cids=1)
Planning emails are now clearer and easier to read, helping employees better understand their shifts. The system also prompts users to add missing employee work email addresses when creating shifts, so schedules are more likely to reach the right people.
Original PR description
This commit will change mail templates in planning to make emails more understandable, specific and breathable. Since these emails are not worth taking so much space in the database, they will now be automatically deleted. When sending a shift to employees, a wizard pops up to let the user add a work email to employees that don't have one so they can receive their shift. However, there was no option to do that when creating a slot for a single employee ; this has now been changed. A wizard now pops up whenever creating a slot allowing you to set a work email for it, if the selected employee has no work email. task-3251693
This update removes an unnecessary internal text conversion in the website generation area. It keeps the code simpler and easier to maintain without changing how users create or manage website pages.
This update makes Sendcloud connection failures easier to understand by showing more specific error messages. It also adds the batch "Print Labels" option directly in the barcode app actions menu, helping warehouse teams complete label printing faster.
Original PR description
*: delivery_sendcloud, stock_barcode_picking_batch This PR adds miscallaneous changes to sendcloud connector and stock picking batch barcode: #### Sendcloud: The PR replaces the old error message that was shown in case of a thrown exception when sending a request to Sendcloud with a more specific message. #### Barcode: The "Print Labels" action of stock picking batch is added to the actions menu in the barcode app. Community PR: odoo/odoo#170350 Task-4004274
The offer generation step is simplified by removing the separate wizard and opening the editable offer form directly. HR users can now adjust key offer details in the form, see relevant warnings there, track who created offers in the list, and have salary configurator links save changes before opening.
Original PR description
The information in the `generate offer wizard` is the same as the information in the offer form view (in which you can also edit the offer similar to the wizard) that is shown after the offer is…
The information in the `generate offer wizard` is the same as the information in the offer form view (in which you can also edit the offer similar to the wizard) that is shown after the offer is generated. Thus, the wizard doesn't provide any value. Also, Studio is disallowed to add fields on wizard. So it's a hindrance to the flow.
1. These changes remove the `generate offer wizard`, move any warning that was generated on the wizard to the offer form view and make `Generate Offer` button lead directly to that form view.
2. They also update the offer views:
1. In offer form view:
1. 'Title' is now editable and the default title doesn't include the offer creation date or the employer budget.
2. `Contract Template`, `Employee Job` and `Department` are now editable.
3. `Refual Reason` and `Refusal Date` now only appear if they aren't empty.
2. In offer list view:
1. A new field `created by` is added to the list view and choose the creator of the offer.
2. The fields are reordered.
3. In addition to that, the changes adapt tours to the new flow after removing the salary wizard.
task-4008437This update simplifies internal text conversion logic across several Odoo Enterprise apps and removes an outdated helper where it was no longer needed. It also fixes menu icon handling so text-based icon data is not decoded incorrectly, improving reliability without changing user workflows.
Resolved issues and error corrections
This fixes a timing issue in the Knowledge sidebar test by waiting until a button is ready before using it. The change helps prevent false test failures, supporting smoother maintenance and more reliable releases.
Original PR description
We wait until the button is enabled before clicking on it.
Cashiers can now switch between email, WhatsApp, and SMS on the receipt screen without losing manually entered contact details. This reduces retyping and helps avoid checkout delays when customer records are missing or incomplete.
Original PR description
Before this commit: ==================== When switching the send options (email, WhatsApp, SMS) on the receipt screen, any manually entered input (such as email or phone number) would be erased if a customer was not selected or if customer data (email or mobile number) was not present. Example: Enter an email address manually. Switch the send option to WhatsApp or SMS. The manually entered email address would be erased. After this commit: ================= Manually entered input will be preserved when switching between send options on the receipt screen. Task-4038000
Code cleanup and technical improvements
This update renames an internal tour setting so that tooltip placement is easier for developers to understand and maintain. It does not change business workflows or user-facing features, but helps reduce confusion when updating guided tours across multiple apps.
Original PR description
In order to clarify and simplify the tours API, it was decided to rename position to tooltipPosition. Indeed, the position key can be confusing while the name tooltipPosition makes things very clear. task~3974087 https://github.com/odoo/odoo/pull/174548
Miscellaneous changes
Current behaviour: --- Connected as Marc Demo, cannot set the Unique Field of any marketing campaign Steps to reproduce: --- 1. Go to Settings > Users > Marc Demo 2. At Marketing Automation, set User 3. Connect as Marc Demo 4. Go to Marketing Automation 5. Open any campaign 6. Try to set the Unique Field 7. Access Error Cause of the issue: --- unique_field_id is comodel of ir.model.fields Fix: --- Give group_marketing_automation_user the right to read ir.model.fields op
Original PR description
Current behaviour: --- Connected as Marc Demo, cannot set the Unique Field of any marketing campaign Steps to reproduce: --- 1. Go to Settings > Users > Marc Demo 2. At Marketing Automation, set User 3. Connect as Marc Demo 4. Go to Marketing Automation 5. Open any campaign 6. Try to set the Unique Field 7. Access Error Cause of the issue: --- unique_field_id is comodel of ir.model.fields Fix: --- Give group_marketing_automation_user the right to read ir.model.fields opw-4001919 Forward-Port-Of: odoo/enterprise#66690
eBay recently changed the URL they send in the viewitemURL. We found 3 different ways they send it, but there might be more. We shouldn't have relied on this URL to match products in the beginning, but we can't refactor this flow in stable, instead, we try a different way to match the url, and fallback on another eBay call to get the expected variant. opw-3934127 Forward-Port-Of: odoo/enterprise#66924
Original PR description
eBay recently changed the URL they send in the viewitemURL. We found 3 different ways they send it, but there might be more. We shouldn't have relied on this URL to match products in the beginning, but we can't refactor this flow in stable, instead, we try a different way to match the url, and fallback on another eBay call to get the expected variant. opw-3934127 Forward-Port-Of: odoo/enterprise#66924
Before, in a multi company and mutli website setup, booking an appointment used the companies on the organizer for the context. This was leading to issue for appointment type in Website 2 tied to Company 2. Indeed the mails for the booking were sent with the context of Company 1 (value based on the allowed_company_ids of the user). Now, when website_appointment is installed, if a website is linked to the actual request we use the company tied to it. This ensure that we always use the corre
Original PR description
Before, in a multi company and mutli website setup, booking an appointment used the companies on the organizer for the context. This was leading to issue for appointment type in Website 2 tied to Company 2. Indeed the mails for the booking were sent with the context of Company 1 (value based on the allowed_company_ids of the user). Now, when website_appointment is installed, if a website is linked to the actual request we use the company tied to it. This ensure that we always use the correct company of the website for the creation of the event. We target 17.0 to avoid a behavior change in older stable as the multi website was officially supported for appointment type in that version. Could be backported if really necessary. task-3977787 Forward-Port-Of: odoo/enterprise#64144
Steps to reproduce - Display the intrastat report with at least one line - Create a european company - Install intrastat - Create and post an invoice to partner from another european country - Open the intrastat report - Deactivate the "Grouped" filter in the Options - Activate the Comparison filter (with any other date) => Traceback stating that the query has syntax error Cause of the issue: Missing parentheses between the different sections of the UNION ALL statement. task-40
Original PR description
Steps to reproduce - Display the intrastat report with at least one line - Create a european company - Install intrastat - Create and post an invoice to partner from another european country - Open the intrastat report - Deactivate the "Grouped" filter in the Options - Activate the Comparison filter (with any other date) => Traceback stating that the query has syntax error Cause of the issue: Missing parentheses between the different sections of the UNION ALL statement. task-4017165 Forward-Port-Of: odoo/enterprise#67302 Forward-Port-Of: odoo/enterprise#65720
Since odoo/odoo@c853c3b rpc requests doesn't block anymore the UI, so in commit odoo/enterprise@70c7a747a19 the manual rpc bus notifications were removed, thus preventing the loading indicator to show up. As we're not blocking the UI anymore, this commit simply change the "silent" rpc call to normal rpc calls so that the loading indicator shows up again. Forward-Port-Of: odoo/enterprise#67367
Original PR description
Since odoo/odoo@c853c3b rpc requests doesn't block anymore the UI, so in commit odoo/enterprise@70c7a747a19 the manual rpc bus notifications were removed, thus preventing the loading indicator to show up. As we're not blocking the UI anymore, this commit simply change the "silent" rpc call to normal rpc calls so that the loading indicator shows up again. Forward-Port-Of: odoo/enterprise#67367
Adding another report for SYSCEBNL. We need to provide a way to add an availability for children of a COA, so the reports is only available for Associations (and not for Companies). Forward-Port-Of: odoo/enterprise#62883
Original PR description
Adding another report for SYSCEBNL. We need to provide a way to add an availability for children of a COA, so the reports is only available for Associations (and not for Companies). Forward-Port-Of: odoo/enterprise#62883
[task-3847374](https://www.odoo.com/web#id=3847374&cids=1&menu_id=6478&action=4043&model=project.task&view_type=form) [PR COM 160368](https://github.com/odoo/odoo/pull/160368) #### barcodes MOV _See COM branch for related commit_ I've moved the OGG and MP3 sounds to the barcodes module so that other modules using barcode scanner can use the same sound file. task-3847374 Related COM PR: https://github.com/odoo/odoo/pull/160368 Forward-Port-Of: odoo/enterprise#60548
Original PR description
[task-3847374](https://www.odoo.com/web#id=3847374&cids=1&menu_id=6478&action=4043&model=project.task&view_type=form) [PR COM 160368](https://github.com/odoo/odoo/pull/160368) #### barcodes MOV _See COM branch for related commit_ I've moved the OGG and MP3 sounds to the barcodes module so that other modules using barcode scanner can use the same sound file. task-3847374 Related COM PR: https://github.com/odoo/odoo/pull/160368 Forward-Port-Of: odoo/enterprise#60548
Instead of calling `env.cr.savepoint()` in a loop, which will create a savepoint at every iteration, we should create a single savepoint and rollback to it at the end of every subtest. In Postgres, the number of sub-transactions that may exist in active transactions has a hard limit of 64 before sub-transactions are stored on disk. It's therefore best practice to limit the number of savepoints we create. See also https://github.com/odoo/odoo/pull/167236 Forward-Port-Of: odoo/enterprise#66
Original PR description
Instead of calling `env.cr.savepoint()` in a loop, which will create a savepoint at every iteration, we should create a single savepoint and rollback to it at the end of every subtest. In Postgres, the number of sub-transactions that may exist in active transactions has a hard limit of 64 before sub-transactions are stored on disk. It's therefore best practice to limit the number of savepoints we create. See also https://github.com/odoo/odoo/pull/167236 Forward-Port-Of: odoo/enterprise#66665 Forward-Port-Of: odoo/enterprise#66322
This traceback occurs when the `generate next recurring shifts` scheduled action runs with multiple planning slots of repeat types as `x_times`. To reproduce this issue:- 1) Install `planning` 2) Create two planning slots with `repeat` and repeat type as `Number of Occurrences` 3) For instance, manually run the `generate next recurring shifts` scheduled action Error:- ``` Expected singleton: planning.recurrency(1, 2) ``` When the scheduled action runs with multiple record s
Original PR description
This traceback occurs when the `generate next recurring shifts` scheduled action runs with multiple planning slots of repeat types as `x_times`. To reproduce this issue:- 1) Install `planning` 2)…
This traceback occurs when the `generate next recurring shifts` scheduled action runs with multiple planning slots of repeat types as `x_times`. To reproduce this issue:- 1) Install `planning` 2) Create two planning slots with `repeat` and repeat type as `Number of Occurrences` 3) For instance, manually run the `generate next recurring shifts` scheduled action Error:- ``` Expected singleton: planning.recurrency(1, 2) ``` When the scheduled action runs with multiple record sets, the `get_all_next_starts` method triggers with `self` containing `multiple recordsets`. https://github.com/odoo/enterprise/blob/5db989feb90086d14d5c3c4f8c0d2233f7029f21/planning/models/planning_recurrency.py#L181 This leads to the `ensure one` traceback, when the `id` is fetching through `self`, where `self ` contains multiple recordsets. https://github.com/odoo/enterprise/blob/5db989feb90086d14d5c3c4f8c0d2233f7029f21/planning/models/planning_recurrency.py#L119-L120 After applying this commit will resolve this issue. sentry-5447858210 Forward-Port-Of: odoo/enterprise#67297 Forward-Port-Of: odoo/enterprise#63959
Runbot error: 71442 The error "Missing widget: productScanner for field of type char" is raised in community builds. This is linked to the fact that the widget is called in community but declared in enterprise. We thus move its usage to the enterprise view override. Community PR: odoo/odoo#173283 Forward-Port-Of: odoo/enterprise#66721
Original PR description
Runbot error: 71442 The error "Missing widget: productScanner for field of type char" is raised in community builds. This is linked to the fact that the widget is called in community but declared in enterprise. We thus move its usage to the enterprise view override. Community PR: odoo/odoo#173283 Forward-Port-Of: odoo/enterprise#66721
After finally checking with a full-fledged accounting customer which is verified by tax lawyers and auditors these changes are needed to show the exact same result as left behind battle tested in `15.0` - `PCVIII` is a sum of `PCVIII3` + `PCVIII4` and those can be part of `PCVIII1` or `PCVIII2` This needs also be reflected in `ABII4` if the balance needs to be mirrored. Actually it should be similar presented in `ABII4`, but was not yet done. This might need some account tags to be adapted
Original PR description
After finally checking with a full-fledged accounting customer which is verified by tax lawyers and auditors these changes are needed to show the exact same result as left behind battle tested in `15.0` - `PCVIII` is a sum of `PCVIII3` + `PCVIII4` and those can be part of `PCVIII1` or `PCVIII2` This needs also be reflected in `ABII4` if the balance needs to be mirrored. Actually it should be similar presented in `ABII4`, but was not yet done. This might need some account tags to be adapted in Odoo Community `l10n_at` CoA, but let's start from here as it is secured and tested information. Info: @wt-io-it Forward-Port-Of: odoo/enterprise#64747
### Before this PR In WhatsApp Composer, the Sample Values do not update when changing the WhatsApp Template. Instead, it display the sample values from the initially selected template. This issue also occurs with the Button URL as well. ### After this PR The Sample Values for Free Text Fields and Button Dynamic URL will now update based on the selected WhatsApp Template. Task-3996935 Forward-Port-Of: odoo/enterprise#66892
Original PR description
### Before this PR In WhatsApp Composer, the Sample Values do not update when changing the WhatsApp Template. Instead, it display the sample values from the initially selected template. This issue also occurs with the Button URL as well. ### After this PR The Sample Values for Free Text Fields and Button Dynamic URL will now update based on the selected WhatsApp Template. Task-3996935 Forward-Port-Of: odoo/enterprise#66892
Before this comit, on a production system, it could happen that 'subscription_state': initial_values.get('subscription_state', '1_draft') would return False. Older SQL constraint could prevent the creation of logs without subscription_state value. ```py 112 @api.model 113 def _create_creation_log(self, order, initial_values): 114 -> return self.create({ 115 'order_id': order.id, 116 'event_type': '0_creation',
Original PR description
Before this comit, on a production system, it could happen that 'subscription_state': initial_values.get('subscription_state', '1_draft') would return False. Older SQL constraint could prevent the…
Before this comit, on a production system, it could happen that
'subscription_state': initial_values.get('subscription_state',
'1_draft') would return False.
Older SQL constraint could prevent the creation of logs without
subscription_state value.
```py
112 @api.model
113 def _create_creation_log(self, order, initial_values):
114 -> return self.create({
115 'order_id': order.id,
116 'event_type': '0_creation',
117 'amount_signed': max(order.recurring_monthly, 0),
118 'recurring_monthly': max(order.recurring_monthly, 0),
119 'subscription_state': initial_values.get('subscription_state', '1_draft'),
120 })
[11:22]
initial_values.get('subscription_state', '1_draft') > False
[11:23]
In [7]: so.subscription_state
Out[7]: False (modifié)
[11:23]
In [9]: so.is_subscription
Out[9]: True
In [10]: so.plan_id
Out[10]: sale.subscription.plan(174,)
```
The resulting SO could not be confirmed as the log creation would fail.
How to reproduce:
1) Create a quotation
2) Cancel it
3) Duplicate it
4) Confirm it
```
of22 File "/home/odoo/src/enterprise/saas-17.2/sale_subscription/models/sale_order_log.py", line 114, in _create_creation_log
of22 return self.create({
of22 File "<decorator-gen-12>", line 2, in create
of22 File "/home/odoo/src/odoo/saas-17.2/odoo/api.py", line 420, in _model_create_multi
of22 return create(self, [arg])
of22 File "/home/odoo/src/odoo/saas-17.2/odoo/models.py", line 4679, in create
of22 records = self._create(data_list)
of22 File "/home/odoo/src/odoo/saas-17.2/odoo/models.py", line 4867, in _create
of22 cr.execute(SQL(
of22 File "/home/odoo/src/odoo/saas-17.2/odoo/sql_db.py", line 365, in execute
of22 res = self._obj.execute(query, params)
of22 psycopg2.errors.NotNullViolation: null value in column "subscription_state" of relation "sale_order_log" violates not-null constraint
of22 DETAIL: Failing row contains (2475879, null, 2024-07-17, 7020.00, 1, 2024-07-17 01:22:56.6721, 1, 2024-07-17 01:22:56.6721, 0_creation, 2617260, 209, 7020.00, 35, 17, null, null, null, 4230165, null, 4230165, null).
```
Forward-Port-Of: odoo/enterprise#67298
Forward-Port-Of: odoo/enterprise#67170Description of the issue/feature this PR addresses: 1 - Create a quality.point and add a repair operation type in the 'picking_type_ids' field 2 - Create a repair picking Current behavior before PR: No QC is created. This is expected because of https://github.com/odoo/enterprise/pull/59509 - only available since 17.3 Desired behavior after PR is merged: Exclude “repair” operation types from the domain of the “picking_type_ids” field to avoid confusing the user. opw-4052819 Forw
Original PR description
Description of the issue/feature this PR addresses: 1 - Create a quality.point and add a repair operation type in the 'picking_type_ids' field 2 - Create a repair picking Current behavior before PR: No QC is created. This is expected because of https://github.com/odoo/enterprise/pull/59509 - only available since 17.3 Desired behavior after PR is merged: Exclude “repair” operation types from the domain of the “picking_type_ids” field to avoid confusing the user. opw-4052819 Forward-Port-Of: odoo/enterprise#67257
We are facing an access error when the planning user tries to access the conflict shift because we have not given the planning user access to the draft shift. Steps to reproduce: - Install the planning app - Go to planning - Create two shifts at the same time (one published and the other in draft) - Create a new planning user - Log in as the planning user - Open the published shift task-3823274 Forward-Port-Of: odoo/enterprise#67346 Forward-Port-Of: odoo/enterprise#66356
Original PR description
We are facing an access error when the planning user tries to access the conflict shift because we have not given the planning user access to the draft shift. Steps to reproduce: - Install the planning app - Go to planning - Create two shifts at the same time (one published and the other in draft) - Create a new planning user - Log in as the planning user - Open the published shift task-3823274 Forward-Port-Of: odoo/enterprise#67346 Forward-Port-Of: odoo/enterprise#66356