Sunday, January 16, 2022
4 changes · master
Miscellaneous changes
Test was failing since 2022-01-16, probably a max 2 years sync ``` FAIL: TestSyncOdoo2Microsoft.test_restart_synchronization Traceback (most recent call last): File "/usr/lib/python3.8/unittest/mock.py", line 1325, in patched return func(*newargs, **newkeywargs) File "/data/build/odoo/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py", line 21, in patched return func(self, *args, **kwargs) File "/data/build/odoo/addons/microsoft_calendar/tests/test_sync_odoo2micro
Original PR description
Test was failing since 2022-01-16, probably a max 2 years sync ``` FAIL: TestSyncOdoo2Microsoft.test_restart_synchronization Traceback (most recent call last): File…
Test was failing since 2022-01-16, probably a max 2 years sync
```
FAIL: TestSyncOdoo2Microsoft.test_restart_synchronization
Traceback (most recent call last):
File "/usr/lib/python3.8/unittest/mock.py", line 1325, in patched
return func(*newargs, **newkeywargs)
File "/data/build/odoo/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py", line 21, in patched
return func(self, *args, **kwargs)
File "/data/build/odoo/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py", line 84, in test_restart_synchronization
self.assertMicrosoftEventPatched(event.microsoft_id, {
File "/data/build/odoo/addons/microsoft_calendar/tests/test_sync_odoo2microsoft.py", line 40, in assertMicrosoftEventPatched
MicrosoftSync._microsoft_patch.assert_called_once()
File "/usr/lib/python3.8/unittest/mock.py", line 892, in assert_called_once
raise AssertionError(msg)
AssertionError: Expected 'mock' to have been called once. Called 0 times.
Calls: [call._constrains(calendar.event(2049,)),
call._constrains().__iter__(),
call._constrains().__len__()].
```
Forward-Port-Of: odoo/odoo#82847Since [1] options could still be used while a background positioning overlay was opened. After this commit the overlay is deactivated whenever an element outside of it is clicked - as initially intended. [1] https://github.com/odoo/odoo/commit/dfd98f49e7f2ab5c94dcae3af2d14750d301fa0a task-2735690 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 guid
Original PR description
Since [1] options could still be used while a background positioning overlay was opened. After this commit the overlay is deactivated whenever an element outside of it is clicked - as initially intended. [1] https://github.com/odoo/odoo/commit/dfd98f49e7f2ab5c94dcae3af2d14750d301fa0a task-2735690 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#82782
Due to #82724 and 8ec7739dd72fa0976697f7738b225dbb9efa7c97, the qweb renderer can't be used directly, however there is no way to use the proper ir.qweb one without a database. This is necessary for the /web/database/ routes (db manager) which work without a database, and require qweb rendering since the abandon of jinja rendering in v15. This patch builds on the preparation work of the qweb/ir_qweb merge in #81024 which introduces a limited helper `render()` method in ir_qweb so that
Original PR description
Due to #82724 and 8ec7739dd72fa0976697f7738b225dbb9efa7c97, the qweb renderer can't be used directly, however there is no way to use the proper ir.qweb one without a database. This is necessary for the /web/database/ routes (db manager) which work without a database, and require qweb rendering since the abandon of jinja rendering in v15. This patch builds on the preparation work of the qweb/ir_qweb merge in #81024 which introduces a limited helper `render()` method in ir_qweb so that it can be used statically without a database. Fixes #82835 Alternative to #82836 Forward-Port-Of: odoo/odoo#82838
Fixup for #82838, which could cause the following crash when creating a new database from the DB manager UI, but not from the command-line: ``` Traceback (most recent call last): File "/home/odoo/15.0/odoo/service/db.py", line 63, in _initialize_db registry = odoo.modules.registry.Registry.new(db_name, demo, None, update_module=True) File "/home/odoo/15.0/odoo/modules/registry.py", line 87, in new odoo.modules.load_modules(registry, force_demo, status, update_module) File
Original PR description
Fixup for #82838, which could cause the following crash when creating a new database from the DB manager UI, but not from the command-line: ``` Traceback (most recent call last): File…
Fixup for #82838, which could cause the following crash when creating a
new database from the DB manager UI, but not from the command-line:
```
Traceback (most recent call last):
File "/home/odoo/15.0/odoo/service/db.py", line 63, in _initialize_db
registry = odoo.modules.registry.Registry.new(db_name, demo, None, update_module=True)
File "/home/odoo/15.0/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/odoo/15.0/odoo/modules/loading.py", line 415, in load_modules
loaded_modules, processed_modules = load_module_graph(
File "/home/odoo/15.0/odoo/modules/loading.py", line 199, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name}, new_install)
File "/home/odoo/15.0/odoo/modules/registry.py", line 427, in init_models
model._auto_init()
File "/home/odoo/15.0/odoo/models.py", line 2795, in _auto_init
raise_on_invalid_object_name(self._name)
File "/home/odoo/15.0/odoo/models.py", line 104, in raise_on_invalid_object_name
raise ValueError(msg)
ValueError: The _name attribute MockIrQWeb is not valid.
```
Not visible on runbot as it does not use the DB manager for creating
databases.
Fixes #82843
Forward-Port-Of: odoo/odoo#82850
Forward-Port-Of: odoo/odoo#82844