Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][OU-ADD] base_automation: migration to 17.0 #4459

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

duong77476-viindoo
Copy link
Contributor

No description provided.

@pedrobaeza
Copy link
Member

pedrobaeza commented Jun 13, 2024

/ocabot migration base_automation

Depends on :

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Jun 13, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 13, 2024
80 tasks
.search([("base_automation_id", "!=", False)])
)
if act_servers:
act_servers._compute_name()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible that certain models are not yet loaded in the migration and that an error occurs when executing this point.

2024-10-08 08:35:05,839 1 ERROR database OpenUpgrade: base_automation: error in migration script /opt/odoo/auto/addons/openupgrade_scripts/scripts/base_automation/17.0.1.0/post-migration.py: 'project.task' 
2024-10-08 08:35:05,844 1 ERROR database OpenUpgrade: 'project.task' 
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/openupgradelib/openupgrade.py", line 2298, in wrapped_function
    func(
  File "/opt/odoo/auto/addons/openupgrade_scripts/scripts/base_automation/17.0.1.0/post-migration.py", line 75, in migrate
    _ir_act_server_update_name_if_base_automation(env)
  File "/opt/odoo/auto/addons/openupgrade_scripts/scripts/base_automation/17.0.1.0/post-migration.py", line 13, in _ir_act_server_update_name_if_base_automation
    act_servers._compute_name()
  File "/opt/odoo/auto/addons/base_automation/models/ir_actions_server.py", line 47, in _compute_name
    action.name = f"{action_type} {action._stringify_path()}"
  File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_actions.py", line 679, in _stringify_path
    model = self.env[self.model_id.model]
  File "/opt/odoo/auto/addons/openupgrade_framework/odoo_patch/odoo/api.py", line 39, in __getitem__
    return Environment.__getitem__._original_method(self, model_name)
  File "/opt/odoo/custom/src/odoo/odoo/api.py", line 534, in __getitem__
    return self.registry[model_name](self, (), ())
  File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 213, in __getitem__
    return self.models[model_name]
KeyError: 'project.task'

Maybe move this part to an end-migrate.py?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it can be move to end-migrate.
Unfortunately i'm no longer doing migration anymore, at least until next year. Feel free to cherry-pick my commit and create you own if you have to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants