Wednesday, January 10, 2024
16 changes · 17.0
Resolved issues and error corrections
Fixes an issue where Kanban boards grouped by a read-only field did not correctly apply rules that should disable drag and drop. This prevents users from accidentally moving cards when the board configuration says those changes should not be allowed.
Original PR description
As a reminder, the readonly expression in grouped kanban can enable or disable the drag and drop feature. If the view is not reaonly but the field in the arch on which the view is grouped is readonly, the drag would be disabled. Before this commit, there was a regression introduced in the owl refactoring that made the kanban record not able to evaluate the readonly expression in the fields. This commit fixes the issue by making the kanban record evaluate the provided expression. It does not however correctly evaluate the expression if it contains another field as the drag and drop feature can be enabled at a view level, not at a per record level. It would then resolve to not readonly.
Reinstalling the Restaurant Point of Sale module could fail after Point of Sale was uninstalled because an existing cash payment setup was created again. The fix reuses the existing payment method when present, preventing the reinstall error and reducing disruption for businesses using restaurant POS.
Original PR description
A traceback occur when user tries to reinstall the pos_restaurant after following steps: 1. Install `pos_restaurant` module 2. Uninstall the `point_of_sale` module 3. Again install `pos_restaurant`…
A traceback occur when user tries to reinstall the pos_restaurant after following steps:
1. Install `pos_restaurant` module
2. Uninstall the `point_of_sale` module
3. Again install `pos_restaurant` module
Error:
```
UniqueViolation: duplicate key value violates unique constraint "account_journal_code_company_uniq"
DETAIL: Key (company_id, code)=(1, MRCSH) already exists.
File "odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "odoo/tools/convert.py", line 280, in _tag_function
_eval_xml(self, rec, env)
File "odoo/tools/convert.py", line 205, in _eval_xml
return odoo.api.call_kw(model, method_name, args, kwargs)
File "odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "addons/pos_restaurant/models/pos_config.py", line 138, in _setup_main_restaurant_defaults
self._ensure_cash_payment_method('MRCSH', _('Cash Restaurant'))
File "addons/point_of_sale/models/pos_config.py", line 724, in _ensure_cash_payment_method
cash_journal = self.env['account.journal'].create({
File "<decorator-gen-670>", line 2, in create
File "odoo/api.py", line 414, in _model_create_multi
return create(self, [arg])
File "addons/account_check_printing/models/account_journal.py", line 62, in create
journals = super().create(vals_list)
File "<decorator-gen-154>", line 2, in create
File "odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "addons/account/models/account_journal.py", line 691, in create
journals = super(AccountJournal, self.with_context(mail_create_nolog=True)).create(vals_list)
File "<decorator-gen-127>", line 2, in create
File "odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "addons/mail/models/mail_alias_mixin_optional.py", line 92, in create
records = super().create(valid_vals_list)
File "<decorator-gen-129>", line 2, in create
File "odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "addons/mail/models/mail_thread.py", line 259, in create
threads = super(MailThread, self).create(vals_list)
File "<decorator-gen-12>", line 2, in create
File "odoo/api.py", line 415, in _model_create_multi
return create(self, arg)
File "odoo/models.py", line 4592, in create
records = self._create(data_list)
File "odoo/models.py", line 4780, in _create
cr.execute(SQL(
File "odoo/sql_db.py", line 332, in execute
res = self._obj.execute(query, params)
ParseError: while parsing /home/odoo/src/odoo/17.0/addons/pos_restaurant/data/pos_restaurant_data.xml:15, somewhere inside
<function model="pos.config" name="_setup_main_restaurant_defaults">
<value eval="[ref('pos_config_main_restaurant')]"/>
</function>
File "odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "odoo/modules/loading.py", line 480, in load_modules
processed_modules += load_marked_modules(env, graph,
File "odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "odoo/modules/loading.py", line 227, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "odoo/tools/convert.py", line 627, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "odoo/tools/convert.py", line 693, in convert_xml_import
obj.parse(doc.getroot())
File "odoo/tools/convert.py", line 613, in parse
self._tag_root(de)
File "odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "odoo/tools/convert.py", line 569, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
```
When users try to reinstall the 'pos_restaurant', a traceback will be generated. Because duplicate 'MRCSH'records exist, they raise the ParseError.
Which leads to the traceback from here
https://github.com/odoo/odoo/blob/8b4f4f2e373896fcaa50f6ee55467274f8e440d5/addons/pos_restaurant/models/pos_config.py#L134-L139
After applying this commit, it will resolve the issue by if the pos payment method
exists, returning the values otherwise create it.
sentry-4736057055This update removes problematic line-break formatting from several translatable messages so translation tools can read them correctly. It helps ensure labels and messages in Point of Sale, Sales integration, Project, and Web can be translated reliably for users in different languages.
Original PR description
The parser of the library we use to extract strings to be translated (python-babel) doesn't handle escaped newlines in the same way as the JavaScript parser. The resulting mismatch makes the content that uses them untranslatable.
for example:
```js
const hey = _t("slt \
çv ?"
);
```
is exported as "slt \nçv ?", while the content of the variable is "slt çv?"
This commit removes faulty occurrences from the code base and re-exports the corresponding POT files.
*: point_of_sale, pos_sale, project, web
Enterprise: https://github.com/odoo/enterprise/pull/52617Project todo list views now show the expected bulk actions when users select multiple todo items. This also restores the export option, making it easier to work with selected todo records in bulk.
Original PR description
thanks to the following PR: https://github.com/odoo/odoo/pull/131369/files todo tasks are not considered grouped by M2M when grouped by personnal stage anymore thus the actions are now available when selecting many list records, but still export is missing so we're adding it to the allowed actions Task-3515879 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The project kanban view now counts only open tasks instead of including completed ones. This gives teams a clearer view of remaining work and avoids overstating project workload.
Original PR description
issue: Currently, the project task count in kanban view calculates all closed and opened task. cause: In this commit 03235ae in task count both closed and open task considered. fix: In project kanban view we only show task count for open task.
The web editor link dialog now supports keyboard actions to confirm or cancel creating a link. This makes editing content faster and more accessible for users who rely on keyboard navigation.
Original PR description
The shortcut for the link dialog was not set, so it was not possible to insert or discard the creation of a link with the keyboard. task-3677041 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents the spreadsheet cell menu from crashing when users open it on cells that do not contain formulas. It improves stability for users working with accounting spreadsheets and avoids an interruption during normal spreadsheet navigation.
Original PR description
The adaptation made in commit 037e5b8, related to this [commit](https://github.com/odoo/o-spreadsheet/commit/17ba12211) forgot to account for non-fomula cells. 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
Odoo Discuss now avoids updating a video or voice call connection when the underlying peer-to-peer connection is no longer available. This prevents errors during the brief moment when a call switches from direct peer-to-peer mode to server-based mode, improving call stability for users.
Original PR description
Before this commit, it was possible that an attempt to update peer connections made right at the moment the connection was swapped from peer-to-peer to server mode. Which would cause a traceback. This commit fixes this issue by checking if there is a `RTCPeerConnection` before trying to update it.
This fix makes Odoo's web testing tools correctly return requested details for linked records. It helps developers catch issues earlier and improves confidence that web features behave as expected before release.
Original PR description
Before this commit, the mockServer didn't respect the unity specification for many2one fields. When you do a mockWebRead and you want to read other fields than "id" and "display_name" for a many2one field, the mockServeur ignores this part of the specification. The goal of this commit is to ensure that the mockWebRead respects the full specification for many2one fields. 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
This fix adjusts demo public holiday data so generated holidays do not accidentally overlap with fixed holidays on the same working calendar. It prevents installation or demo setup errors on certain dates, improving reliability for trial and demonstration environments.
Original PR description
In demo/data some places public holidays are fixed, and at some places they are "moving" like - datetime.today() + relativedelta(days=+x)). On 06-01-2024 the following error occurred - Two public…
In demo/data some places public holidays are fixed, and at some places they are "moving" like - datetime.today() + relativedelta(days=+x)). On 06-01-2024 the following error occurred - Two public holidays cannot overlap each other for the same working hours This happened because the Indian public holiday - Makar Sakranti - is set on %Y-01-14 [1] And the company is not set on it straight away. It is set in demo [2] That leave overlapped with -Public Time Off [3] which is set as datetime.today() + relativedelta(days=+8)). The public Time off, when server runs 06-01-2024, makes 14-01-2024. As we can't set two public holidays on the same day, we got an error. Note that this issue can be fixed in two ways: - either move Indian public holidays in demo data and assign company on creation, - or fix date_from of generic public holidays. For now, we choose to fix generic public holidays, as it's demo data and less important. [1] https://github.com/odoo/enterprise/blob/fcc15c438a2bdb22f4dc7bcd33bbe78ce4f83246/l10n_in_hr_payroll/data/resource_calendar_leaves_data.xml#L23-L29 [2] https://github.com/odoo/enterprise/blob/fcc15c438a2bdb22f4dc7bcd33bbe78ce4f83246/l10n_in_hr_payroll/demo/l10n_in_hr_payroll_demo.xml#L13-L15 [3] https://github.com/odoo/odoo/blob/762b087aeeaea6e9bbea98795294503f21856ae2/addons/hr_holidays/data/hr_holidays_demo.xml#L451-L457
Fixed an issue where the trash workspace was incorrectly appearing as an option when users created new spreadsheets. The trash workspace is now properly excluded from the workspace selection, ensuring users can only save spreadsheets to active workspaces.
Original PR description
Before this commit: When a user creates a new spreadsheet in all workspace, the trash workspace was included in the selection. After this commit: The trash workspace is no longer available in the selection when creating a new spreadsheet in all workspace. Task-3584275
This update fixes a visual issue in dark mode where the dropdown menu button in the top navigation bar wasn't properly highlighted when focused. The button's background color was blending in with the navigation bar, making it hard to see. We've adjusted the color to make the focused state clearly visible to users.
Original PR description
This PR solves an issue about the dropdown toggle from the topbar navigation not being highlighted on `:focus` state. This comes from a color issue, the `background-color` of the toggle being the same as the navbar one in dark mode. To solve this issue, we redefine the variable in dark mode, and set it to `$o-gray-300`. task-3607749 Forward-Port-Of: odoo/enterprise#51285
This fix corrects a test in the data merge module that was failing due to inconsistent error messages. The test now properly validates error messages when merging partners with hashed invoice entries by ensuring the correct test conditions are in place before running the validation.
Original PR description
Steps to reproduce: - have an instance with no invoice posted - run the test `test_merge_partner_in_hashed_entries` Issue: The error message generated will not match the one specified in the test. Cause: The message discrepancy is dependent on whether all invoices or only a portion of them are hashed. https://github.com/odoo/odoo/blob/2023b96c725617cb8b403cd89769e5dbc07e1ddc/addons/account/models/company.py#L626 Solution: Post an invoice before restricting the journal runbot-54407 Forward-Port-Of: odoo/enterprise#53899
This update fixes translation issues in the Web Studio app creation feature. Two text strings that users see when creating a new app were not being properly translated into different languages. The fix ensures these user-facing messages are now correctly translatable, improving the experience for non-English users.
Original PR description
2 strings related to creating a new app within studio weren't being correctly translated, so we make them translatable now. Note that the solution before v16 is different (uses getter) because for some reason `<t t-set="variable">Some string</t>` isn't correctly parsed as a string by the props, so an error is thrown while in debug mode. Forward-Port-Of: odoo/enterprise#53930 Forward-Port-Of: odoo/enterprise#53585
This update corrects the configuration paths in jsconfig.json, which helps code editors provide accurate autocompletion suggestions to developers. The paths were not properly configured when the web module is used in enterprise environments, and this fix ensures developers have a better coding experience with proper IDE support.
Original PR description
The jsconfig.json file is used by editors to provide autocompletion but the paths were not updated when it's used in the enterprise path. 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#148618 Forward-Port-Of: odoo/odoo#148605
This fix removes the "Kitchen Note" button that was incorrectly appearing in Shop point-of-sale sessions. The button is only relevant for restaurant operations, not retail shops. The change disables the internal notes feature by default for shop configurations, ensuring a cleaner and more appropriate user interface for non-restaurant businesses.
Original PR description
To reproduce (16.2 and >): 1. Install pos_restaurant 2. Open the Shop pos session -> "Kitchen Note" button display => Unintended as this button does only make sense in restaurant Before this commit: The button actually shows due to `iface_orderline_notes` value being set to `True` by default. After this commit: The setting value is unset (for shops) to prevent the button to render opw-3651750 Forward-Port-Of: odoo/odoo#148473 Forward-Port-Of: odoo/odoo#147774