Tuesday, October 5, 2021
8 changes · master
Resolved issues and error corrections
The backend HTML editor no longer warns users about unsaved changes when nothing was changed. This prevents confusing prompts when leaving or reloading backend pages, while keeping the warning where it is still needed on public website editing.
Original PR description
Task [2371592](https://www.odoo.com/web#id=2371592&action=333&active_id=133&model=project.task&view_type=form&cids=1&menu_id=4720)
This fixes an issue where simply viewing payment provider settings could accidentally trigger data updates and cause validation errors. The change helps keep payment configuration pages accessible and stable, especially during upgrade checks.
Original PR description
`compute` shouldn't write things. This means `writes` can occur just by reading records. Instead, when you want to assign multiple compute fields at once, `update` should be used. ``` 2021-10-04…
`compute` shouldn't write things. This means `writes` can occur
just by reading records.
Instead, when you want to assign multiple compute fields at once,
`update` should be used.
```
2021-10-04 12:42:21,132 61 ERROR db_40421 odoo.upgrade.base.tests.test_mock_crawl: FAIL: TestCrawler.test_check
Traceback (most recent call last):
File "/tmp/tmpn37k1zm_/migrations/testing.py", line 208, in test_check
self.check(value)
File "/tmp/tmpn37k1zm_/migrations/base/tests/test_mock_crawl.py", line 85, in check
self.assertFalse(diff, msg)
AssertionError: [('payment.payment_acquirer_menu', 217, 'Accounting > Configuration > Payments > Payment Acquirers', 312)] is not false : At least one menu or view working before upgrade is not working after upgrade.
('payment.payment_acquirer_menu', 217, 'Accounting > Configuration > Payments > Payment Acquirers', 312):
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 879, in get
return field_cache[record._ids[0]]
KeyError: 8
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1057, in __get__
value = env.cache.get(record, self)
File "/home/odoo/src/odoo/15.0/odoo/api.py", line 882, in get
raise CacheMiss(record, field)
odoo.exceptions.CacheMiss: 'payment.acquirer(8,).show_credentials_page'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmpn37k1zm_/migrations/base/tests/test_mock_crawl.py", line 182, in crawl_menu
self.mock_action(action_vals)
File "/tmp/tmpn37k1zm_/migrations/base/tests/test_mock_crawl.py", line 293, in mock_action
mock_method(model, view, fields_list, domain, group_by)
File "/tmp/tmpn37k1zm_/migrations/base/tests/test_mock_crawl.py", line 319, in mock_view_form
[data] = record.read(fields_list)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3227, in read
return self._read_format(fnames=fields, load=load)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 3247, in _read_format
vals[name] = convert(record[name], record, use_name_get)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 5867, in __getitem__
return self._fields[key].__get__(self, type(self))
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1106, in __get__
self.compute_value(recs)
File "/home/odoo/src/odoo/15.0/odoo/fields.py", line 1265, in compute_value
records._compute_field_value(self)
File "/home/odoo/src/odoo/15.0/odoo/models.py", line 4249, in _compute_field_value
getattr(self, field.compute)()
File "/home/odoo/src/odoo/15.0/addons/payment_transfer/models/payment_acquirer.py", line 21, in _compute_view_configuration_fields
super()._compute_view_configuration_fields()
File "/home/odoo/src/odoo/15.0/addons/payment/models/payment_acquirer.py", line 168, in _compute_view_configuration_fields
'show_cancel_msg': True,
File "/home/odoo/src/odoo/15.0/addons/payment_transfer/models/payment_acquirer.py", line 41, in write
res = super().write(values)
File "/home/odoo/src/odoo/15.0/addons/payment/models/payment_acquirer.py", line 234, in write
self._check_required_if_provider()
File "/home/odoo/src/odoo/15.0/addons/payment/models/payment_acquirer.py", line 260, in _check_required_if_provider
_("The following fields must be filled: %s", ", ".join(field_names))
odoo.exceptions.ValidationError: The following fields must be filled: Email
```
upg-40421
closes odoo/odoo#77752Fixes an issue where changing the quantity on a purchase order for a kit product could update the related receipt with incorrect component quantities. This helps ensure warehouse receipts match the revised order and prevents over- or under-receiving kit components.
Original PR description
Steps to reproduce the bug:
- Create a BOM kit for “product K” with:
- 2 * “product A”
- 1 * “product B”
- Create a PO for 1 unit of “product K” > confirm
- A receipt delivery with 2 units of “product A” and 1 unit of B will be created
- Modify the ordered Qty to 2 units of “Product K”
Problem:
The receipt delivery will not be updated correctly (4 units of product A and 3 of product B)
because the `"_prepare_stock_moves"` function computed the previous quantity wrong based on the moves quantities
since the moves are for products A and B, not product F.(do not take into account the products in kit)
Solution:
For kit products, do not calculate from the `"stock.move"`, calculate the difference between the quantity before and after the change
opw-2645719
Forward-Port-Of: #77706
Forward-Port-Of: #76965
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prWebsite header templates were adjusted to display more consistently across desktop and mobile. The changes improve menu behavior, alignment, call-to-action visibility, and selected link styling, helping visitors navigate sites more reliably.
The website editor now avoids freezing when users reduce the number of columns in a page snippet. This restores a content editing option and helps prevent disruption while updating website layouts.
Original PR description
When decreasing the number of columns through the column count snippet option, the editor entered a deadlock situation. This reverts [1] which is the cause, trying to await the UI update during a snippet removal. This commit first prevents the deadlock while waiting for a better solution to be implemented. [1]: https://github.com/odoo/odoo/commit/ab7508393376075f95d6dd5925e7f4462936d24e task-2652904 X-original-commit: ae219ec06baf0280c76ae09b1453cc1481eece30
This update fixes a test cleanup issue that caused some document-related tests to fail unpredictably. It ensures expected dropdown elements are properly recognized during cleanup, improving confidence in automated quality checks without changing user-facing behavior.
Original PR description
Since commit [1], several tests from the "documents" addon failed randomly, because there were leftovers in the DOM at the end of the tests. Those leftovers were the many2one dropdowns. Since v12, we whitelist jQuery autocomplete dropdowns in the leftover check. However, since [1], the many2one autocomplete has an additionnal className, and it thus didn't match the element in the whitelist anymore. Note that we duplicated the entry in the whitelist because we need both (there are several types of autocomplete dropdowns in the "documents" view). [1] 84715436d87bb05b421bc9ccaacda67d07571690 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
The Swedish Point of Sale localization was updated to stop using an outdated setting that no longer exists. This prevents errors and keeps the Swedish POS compliance features working correctly after recent platform changes.
Original PR description
Forward port of https://github.com/odoo/enterprise/pull/21406
This fixes a test timing issue in Documents so checks wait for the inspector to finish updating before validating results. The change helps prevent false test results and improves confidence that document selection behavior works as expected.
Original PR description
The modified test selects records and checks the update in the document inspector. It does it twice: once with a record linked to a document, and one with a record not linked to anything. In the first case, we wait for an extra tick s.t. the inspector is updated, before doing the assertions. In the second case, we don't wait, so the assertions are therefore always true (they are all "negative" assertions, i.e. "containsNone").