Daily updates from Odoo
Wednesday, January 15, 2025
12 changes · master
Enhancements to existing features
Barcode operation type cards now show their color as a left-side accent instead of filling the whole card background, making the view easier to scan. Users can also choose the operation type color directly from the form, giving teams more control over visual organization.
Original PR description
The cards in the barcode kanban view for picking operation types should have their standard colour streak on the left border instead of the entire card background. A colour picker for the `color` field was also added to the operation type form view to allow the user to adjust it as needed. Task ID: [4385345](https://www.odoo.com/odoo/project/966/tasks/4385345)
Resolved issues and error corrections
This fixes an issue in the manufacturing planning forecast details where purchase order quantities could be handled incorrectly. The change uses the quantity value that is already in the right unit, helping ensure planning figures are accurate without unnecessary conversion.
Original PR description
There was an error due to this PR: https://github.com/odoo/odoo/pull/186250 The field in the wizard should have been renamed, but since `product_uom_qty` is already in the correct unit, we can simply do the sum without converting.
Code cleanup and technical improvements
Company-related information in the web client is now managed through the existing user profile object instead of a separate company service. This reduces duplicated data handling and makes future maintenance easier across many Odoo apps, with little expected impact on day-to-day users.
Original PR description
This commit aims to simplify the way developers can access company related information in the web client. Before this commit, in components, they had to import the `userService` hook and do something…
This commit aims to simplify the way developers can access company related information in the web client. Before this commit, in components, they had to import the `userService` hook and do something like `this.company = userService("company")` in the setup. In services, they had to explicitly declare the dependency on the company service. In other functions (like helpers), it was a bit painful: the function had to take an env in arguments, which wasn't ideal.
This commit makes it easier to access the company information. The company service has been removed. Instead, we use the existing `user` object which can be imported directly from anywhere. The `user` object was chosen because the company information is all related to the currently logged-in user.
For clarity, the company information has been renamed:
user.allowedCompanies: The list of companies that the user is allowed to log in to. Note that any of the other companies in the following keys will always be in this list.
user.defaultCompany: The default company to log in to, if the cookies are empty.
user.activeCompanies: The list of the companies that the user is currently logged in to
user.activeCompany: The main company that the user is currently logged in to. This is the company displayed in the main navigation bar in the web client.
Note that, something similar has already been done for the `user` service, the `cookie` service, the `router` service, and the `rpc` service.
This commit also allows the `user` object to take ownership of the company related information in the session. The problem before this commit was that there were 2 sources of truth for company related information : the company service and the `session_info`. The information is sent from the server to the client within the page (in `session_info`). Then the company service was built using this information. This means that the developer could access the information in 2 different ways. Now, the `user` object takes the full ownership of these company related keys by removing them from the session after reading them. Note that, something similar is already done for the user related information and for the currencies (see currency.js).
Part-of task-id 3621046
Part-of task-id 4250356
Part-of task-id 2224776The follow-up reminder automation was renamed internally to better match its purpose, making the system easier to maintain. Related tests were updated to reflect how SMS follow-up processing is now triggered, with no expected change for day-to-day users.
Original PR description
- account_followup: rename the cron xmlid ir_cron_follow_up - ~~sale_amazon: lower rate for pickings and orders~~ odoo/odoo#191863 task-2774819
Miscellaneous changes
**Steps to reproduce:** Switch to mobile view Reload the page Select any record Traceback occurs **Technical:** After commit https://github.com/odoo/odoo/commit/ef3656e3468ba6dab207c8df65d12fbb75ae4c77, the 'isPageSelected' condition was removed for the ALL button in the "web.list.selection" template. As a result, the first two conditions will be true, and the system will then check for model.root.isRecordCountTrustable. However, at that point, the model is not available. Previously, the
Original PR description
**Steps to reproduce:** Switch to mobile view Reload the page Select any record Traceback occurs **Technical:** After commit https://github.com/odoo/odoo/commit/ef3656e3468ba6dab207c8df65d12fbb75ae4c77, the 'isPageSelected' condition was removed for the ALL button in the "web.list.selection" template. As a result, the first two conditions will be true, and the system will then check for model.root.isRecordCountTrustable. However, at that point, the model is not available. Previously, the false value of isPageSelected would prevent the check for the model from occurring. **After this commit:** The user will not encounter any traceback when selecting a record in mobile view. Task-4402442 Forward-Port-Of: odoo/enterprise#76174
Since https://github.com/odoo/odoo/commit/d0e7be7832672d476f1b289af52d3a425990d719 we're trying to access some keys in `account.document_tax_totals_template` that are not present in the subtotals dict from the withhold tax summary. Steps: - Create and confirm a bill - Add a withhold and open it - Try to print it -> TB: 'KeyError' opw-4433279 Forward-Port-Of: odoo/enterprise#76330
Original PR description
Since https://github.com/odoo/odoo/commit/d0e7be7832672d476f1b289af52d3a425990d719 we're trying to access some keys in `account.document_tax_totals_template` that are not present in the subtotals dict from the withhold tax summary. Steps: - Create and confirm a bill - Add a withhold and open it - Try to print it -> TB: 'KeyError' opw-4433279 Forward-Port-Of: odoo/enterprise#76330
Since [1], this flow is broken: 1. Install website_helpdesk => You have a "Help" menu with an helpdesk team as url (/helpdesk/customer-care-1) which is created 2. Check: if you publish or unpublish your team, that menu is visible or invisible as a public user. 3. Create a new menu for your website, with that same URL (/helpdesk/customer-care-1) 4. Check: that menu is always invisible as a public user. Even if you remove the first menu. Multiple mistakes were made with [1]: - Th
Original PR description
Since [1], this flow is broken: 1. Install website_helpdesk => You have a "Help" menu with an helpdesk team as url (/helpdesk/customer-care-1) which is created 2. Check: if you publish or unpublish…
Since [1], this flow is broken: 1. Install website_helpdesk => You have a "Help" menu with an helpdesk team as url (/helpdesk/customer-care-1) which is created 2. Check: if you publish or unpublish your team, that menu is visible or invisible as a public user. 3. Create a new menu for your website, with that same URL (/helpdesk/customer-care-1) 4. Check: that menu is always invisible as a public user. Even if you remove the first menu. Multiple mistakes were made with [1]: - The website menu visibility override code was added twice in two different files. - The override advertises that this is for "always showing the helpdesk team menus even if they are unpublished" but it is actually meant to be the exact opposite of that. - The implementation is based on the menu that are linked to the helpdesk teams, not on their URL **. - The implementation actually bypass the normal visibility computation for all menu URL that start with "/helpdesk", meaning a custom page "/helpdesk-hello" from the user is just broken, so as existing controllers not linked to an helpdesk team (such as /helpdesk/rating). **: actually this could mean that this feature is just not meant to be given the current state of the codebase: creating a menu with a team URL should just make it so it is forcefully linked to that team or should be prevented if it cannot (?). [1]: https://github.com/odoo/enterprise/commit/a888fb57ebd2458bc8479e187088cb2e96b811fa opw-3931376 Forward-Port-Of: odoo/enterprise#76797 Forward-Port-Of: odoo/enterprise#63105
… Jan 2025 task-4409214 Forward-Port-Of: odoo/enterprise#76274
Original PR description
… Jan 2025 task-4409214 Forward-Port-Of: odoo/enterprise#76274
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#76588Before Commit: ----------------------------- - When a user makes a sign request for himself he can refuse the request by clicking on the refusal button. - Currently a user can edit the extension in the template name. It does not affect the original file but still does not provide a good user experience. - Rpc calls were made when you insert a sign item, move a sign item, delete the sign item. After Commit: ----------------------- - The user will not be able to refuse a sign request h
Original PR description
Before Commit: ----------------------------- - When a user makes a sign request for himself he can refuse the request by clicking on the refusal button. - Currently a user can edit the extension in…
Before Commit: ----------------------------- - When a user makes a sign request for himself he can refuse the request by clicking on the refusal button. - Currently a user can edit the extension in the template name. It does not affect the original file but still does not provide a good user experience. - Rpc calls were made when you insert a sign item, move a sign item, delete the sign item. After Commit: ----------------------- - The user will not be able to refuse a sign request he made for himself - Removed . form Setting labels - Changed the Sign Items pop-up button on from Validated to Save - Improved the Kanban View - Improved the Selection sign item pop-up by adding a custom Many2Many field - Now the extension of a file is read only and a user cannot edit it. - A new sign status indicator is added to reduce the number of rpc calls. - Now only the rpc call is made when a user manually saves it, changes the view or clicks on a sign item. task-3911221 Forward-Port-Of: odoo/enterprise#64194
This commit change the account_move field we use to compute mod349 report. Before, we used amount_total. Now we use amount_untaxed, as the mod349 only need to show taxable bases. opw-4320487 Forward-Port-Of: odoo/enterprise#76516
Original PR description
This commit change the account_move field we use to compute mod349 report. Before, we used amount_total. Now we use amount_untaxed, as the mod349 only need to show taxable bases. opw-4320487 Forward-Port-Of: odoo/enterprise#76516
The aim of this commit is changing 36000 banks for the real number (~26000 banks). no task id Proof:  Forward-Port-Of: odoo/enterprise#77047
Original PR description
The aim of this commit is changing 36000 banks for the real number (~26000 banks). no task id Proof:  Forward-Port-Of: odoo/enterprise#77047