You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to migrate a v14 Db to v15, it fails during hr_holidays handling.
Module
hr_holidays
2023-02-08 17:08:00,004 30571 INFO DATA odoo.modules.loading: Loading module hr_holidays (33/63)
2023-02-08 17:08:00,173 30571 INFO DATA odoo.modules.registry: module hr_holidays: creating or updating database tables
2023-02-08 17:08:00,328 30571 INFO DATA odoo.models: Storing computed values of hr.leave.holiday_allocation_id
2023-02-08 17:08:00,329 30571 INFO DATA odoo.models: Storing computed values of hr.leave.employee_company_id
2023-02-08 17:08:00,329 30571 INFO DATA odoo.models: Storing computed values of hr.leave.employee_ids
2023-02-08 17:08:00,329 30571 INFO DATA odoo.models: Storing computed values of hr.leave.multi_employee
2023-02-08 17:08:00,331 30571 INFO DATA odoo.models: Storing computed values of hr.leave.allocation.employee_company_id
2023-02-08 17:08:00,331 30571 INFO DATA odoo.models: Storing computed values of hr.leave.allocation.employee_ids
2023-02-08 17:08:00,331 30571 INFO DATA odoo.models: Storing computed values of hr.leave.allocation.multi_employee
2023-02-08 17:08:00,331 30571 INFO DATA odoo.models: Storing computed values of hr.leave.allocation.accrual_plan_id
2023-02-08 17:08:00,459 30571 WARNING DATA odoo.modules.loading: Transient module states were reset
2023-02-08 17:08:00,460 30571 ERROR DATA odoo.modules.registry: Failed to load registry
2023-02-08 17:08:00,460 30571 CRITICAL DATA odoo.service.server: Failed to initialize database `DATA`.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/service/server.py", line 1260, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 87, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 472, in load_modules
force, status, report, loaded_modules, update_module, models_to_check)
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 365, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 199, in load_module_graph
registry.init_models(cr, model_names, {'module': package.name}, new_install)
File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 445, in init_models
env['base'].flush()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 5658, in flush
self.recompute()
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6131, in recompute
process(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 6115, in process
field.recompute(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1247, in recompute
self.compute_value(recs)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1269, in compute_value
records._compute_field_value(self)
File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 411, in _compute_field_value
return super()._compute_field_value(field)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 4271, in _compute_field_value
self.filtered('id')._validate_fields(fnames)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 1367, in _validate_fields
check(self)
File "/usr/lib/python3/dist-packages/odoo/addons/hr_holidays/models/hr_leave.py", line 718, in _check_date_state
raise ValidationError(_("This modification is not allowed in the current state."))
odoo.exceptions.ValidationError: Cette modification n'est pas autorisée dans l'état actuel.
2023-02-08 17:08:00,462 30571 INFO DATA odoo.service.server: Initiating shutdown
2023-02-08 17:08:00,462 30571 INFO DATA odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown.
2023-02-08 17:08:00,462 30571 INFO DATA odoo.sql_db: ConnectionPool(used=0/count=0/max=64): Closed 1 connections
When trying to migrate a v14 Db to v15, it fails during
hr_holidays
handling.Module
hr_holidays
The affected record is this one :
It is, indeed, in validate mode, which is one of the state that triggers this error (to prevent date change, I guess)
I guess the migration script should not try to change dates of past leaves ? (I don´t know if it tries to)
Environment
The text was updated successfully, but these errors were encountered: