Tuesday, October 5, 2021
4 changes · master
Resolved issues and error corrections
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