Thursday, April 27, 2023
5 changes · master
Resolved issues and error corrections
This fix prevents an extra, misleading error from appearing when a new database fails during setup before the module tracking table has been created. It keeps the logs focused on the real cause of the failure, helping support and operations teams diagnose startup issues faster.
Original PR description
When instantiating a new registry, this piece of code is called ```python try: odoo.modules.load_modules(registry, force_demo, status, update_module) except Exception:…
When instantiating a new registry, this piece of code is called
```python
try:
odoo.modules.load_modules(registry, force_demo, status, update_module)
except Exception:
odoo.modules.reset_modules_state(db_name)
raise
```
For a new database, load_modules will create the table ir_module_module in the same transaction as everything else. This means that if any error occurs, the transaction is rollbacked and the table ir_module may not exist.
`reset_modules_state` will try to access ir_module_module table leading to another error and an unecessary and confusing error log.
```python
2023-04-26 12:05:34,823 616958 ERROR ? odoo.sql_db: bad query: UPDATE ir_module_module SET state='installed' WHERE state IN ('to remove', 'to upgrade')
ERROR: relation "ir_module_module" does not exist
LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN...
^
2023-04-26 12:05:34,823 616958 ERROR ? odoo.modules.registry: Failed to load registry
2023-04-26 12:05:34,824 616958 CRITICAL ? odoo.service.server: Failed to initialize database `test-base`.
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 386, in load_modules
raise Exception('An error')
Exception: An error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-14>", line 2, in new
File "/home/xdo/osrc/master/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 92, in new
odoo.modules.reset_modules_state(db_name)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 622, in reset_modules_state
cr.execute(
File "/home/xdo/osrc/master/odoo/odoo/sql_db.py", line 311, in execute
res = self._obj.execute(query, params)
psycopg2.errors.UndefinedTable: relation "ir_module_module" does not exist
LINE 1: UPDATE ir_module_module SET state='installed' WHERE state IN...
```
With this commit, we check the ir_module_module table existance avoiding an exception and revealing the minimal traceback.
```python
2023-04-26 12:11:21,218 617810 INFO ? odoo.modules.loading: skipping reset_modules_state, ir_module_module table does not exists
2023-04-26 12:11:21,218 617810 ERROR ? odoo.modules.registry: Failed to load registry
2023-04-26 12:11:21,218 617810 CRITICAL ? odoo.service.server: Failed to initialize database `test-base`.
Traceback (most recent call last):
File "/home/xdo/osrc/master/odoo/odoo/service/server.py", line 1302, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "<decorator-gen-14>", line 2, in new
File "/home/xdo/osrc/master/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/home/xdo/osrc/master/odoo/odoo/modules/registry.py", line 90, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/home/xdo/osrc/master/odoo/odoo/modules/loading.py", line 386, in load_modules
raise Exception('An error')
Exception: An error
```This fix restores the visual status indicator for attendees shown in calendar event tag lists. Users can again quickly see whether attendees have accepted or responded to an event, reducing confusion when reviewing meetings.
Original PR description
https://github.com/odoo/odoo/pull/110188 introduced a change in the TagsList component, making the className prop be used in the parent tag rather than the image tag. This change makes sense as most times you want to add classes to the root element in the component. However, in calendar, we used className to style the image tag, to allow showing the calendar attendee status for an event. This commit introduces the imageClass property that should be passed in the tags prop. Therefore, tags list will now have both className and imageClass, making it possible to style both tags. task-3277079 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
Enterprise modules were adjusted to stay compatible with a related platform-wide layout correction in the community edition. This keeps appraisal, payroll, recruitment signing, and knowledge screens and tests working as expected after the underlying change.
Original PR description
Community counterpart: https://github.com/odoo/odoo/pull/119815 ### [FIX] *: adapt enterprise to the fix of root class attr *: adaptations for hr_appraisal_skills, hr_payroll, hr_recruitment_sign, knowledge **Introduced Changes** This is the enterprise counterpart for the adaptations due to changes in the community repo. See the commit of the community PR https://github.com/odoo/odoo/pull/119815 which states the following sentence: « ... the whole codebase has been checked and adapted ... »
The Knowledge app version is updated to 1.0 to match existing upgrade expectations. This keeps versioning consistent and helps avoid confusion during upgrades or maintenance.
Original PR description
Let us consider it is now 1.0 . And be coherent with upgrade scripts that already exist.
A minor issue in payroll planning calculations was corrected after a recent change introduced an incompatibility in how grouped payroll data was read. This helps ensure payroll planning information is processed reliably without changing the user workflow.
Original PR description
In https://github.com/odoo/enterprise/commit/0a24c01ec178984df032710b81d562366c016ebb, a small error has been introduced, fix it (_read_group has a new API)