Friday, February 9, 2024
5 changes · saas-17.1
Resolved issues and error corrections
This fix prevents an upgrade or module update from failing when administrator settings were already created by another module. It avoids creating a duplicate settings record, improving reliability during installations and upgrades.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: This traceback raised because data is already present in with user_id 2 because if we will install ``mail`` freshly…
Description of the issue/feature this PR addresses:
Current behavior before PR:
This traceback raised because data is already present in with user_id 2 because if we will install ``mail``
freshly this entry will generate due to this function [``_find_or_create_for_user``](https://github.com/odoo/odoo/blob/3adeb31b9028bd70f0a692d9c13f96b29dc1cf87/addons/mail/models/res_users_settings.py#L27C9-L27C33) call from [here](https://github.com/odoo/odoo/blob/fa9e4cb93f26ada5d68de4696033da4f1db2e1ab/addons/mail/models/res_users.py#L188)
with no ir_model_data entry and while updating newly record introduce [here](https://github.com/odoo/odoo/blob/f839688c1cefc5113bbefe1aecfaef97067f6e59/odoo/addons/base/data/res_users_data.xml#L26) in saas-17.1 it creating new entry in res_users_setting and its voilating the unique constraint of the [user_id](https://github.com/odoo/odoo/blob/f839688c1cefc5113bbefe1aecfaef97067f6e59/odoo/addons/base/models/res_users_settings.py#L14)
Desired behavior after PR is merged:
for prevent voilation of unique constraint used forcecreate="0"
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/saas-17.1/odoo/service/server.py", line 1286, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-14>", line 2, in new
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/odoo/src/odoo/saas-17.1/odoo/modules/registry.py", line 119, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/src/odoo/saas-17.1/odoo/modules/loading.py", line 422, in load_modules
loaded_modules, processed_modules = load_module_graph(
File "/home/odoo/src/odoo/saas-17.1/odoo/modules/loading.py", line 227, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "/home/odoo/src/odoo/saas-17.1/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/convert.py", line 627, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/convert.py", line 693, in convert_xml_import
obj.parse(doc.getroot())
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/convert.py", line 613, in parse
self._tag_root(de)
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "/home/odoo/src/odoo/saas-17.1/odoo/tools/convert.py", line 569, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /home/odoo/src/odoo/saas-17.1/odoo/addons/base/data/res_users_data.xml:26, somewhere inside
<record id="user_admin_settings" model="res.users.settings">
<field name="user_id" ref="base.user_admin"/>
</record>
```
TBG-1066
upg-1311090,1311854
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThis change updates Odoo's core utility behavior and its related test coverage. It appears to be a small internal adjustment intended to improve reliability without introducing a visible business workflow change.
Original PR description
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
Restaurant staff can now print receipts for orders that have already been paid without triggering an error. This helps avoid disruption during checkout and keeps receipt handling reliable after payment.
Original PR description
Before this commit, an error was raised when attempting to print a receipt for a paid order in the restaurant module. opw-3735460 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The Helpdesk reporting menu now hides the SLA Status Analysis option when SLA policies are turned off for all teams. This prevents users from seeing a report that is not relevant to their current Helpdesk setup.
Original PR description
Steps to reproduce: - Go to Helpdesk - Navigate to Configuration > Teams - Turn off the 'sla policies' from the form view of all teams. - Check in the reporting section the 'sla status analysis' menu item is visible for the teams. Issue: - The 'sla status analysis' menu item shouldn't be visible if the 'sla policies' feature is disabled on all teams Solution: - Updated the visibility of the 'sla status analysis' menu item based on the 'sla policies' by adding the groups task-3549328
The Documents inspector now keeps the trash action available when users select multiple documents. This prevents confusion and lets users delete selected documents without changing their selection.
Original PR description
Purpose ======= Fix the trash button which was disappearing from the inspector when multiple documents are selected. Specifications ============== When only one document is selected, the trash button is displayed next to the "Name" field in the inspector. When multiple documents are selected, this "Name" field is hidden preventing the trash button to be displayed. Moving the trash button next to the "Contact" field when multiple documents are selected for it to keep being accessible. Task-3700965