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

[15.0][MIG] web_ir_actions_act_view_reload: Migration to 15.0 #2240

Closed
wants to merge 20 commits into from
Closed

[15.0][MIG] web_ir_actions_act_view_reload: Migration to 15.0 #2240

wants to merge 20 commits into from

Conversation

manuelcalerosolis
Copy link
Contributor

This is the migration of ir_actions_act_view_reload to 15.0

* @returns {Promise} Resolved promise
*/
_executeReloadAction: function () {
var controller = this.getCurrentController();
Copy link
Member

@StefanRijnhart StefanRijnhart Jun 29, 2022

Choose a reason for hiding this comment

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

Does #2241 apply here as well?

@StefanRijnhart
Copy link
Member

This PR #2192 implies that the module breaks in some cases if the action is not defined as a model. Do you want to review it, and check if this is still true in Odoo 15?

@StefanRijnhart StefanRijnhart changed the title [15.0][MIG] ir_actions_act_view_reload: Migration to 15.0 [15.0][MIG] web_ir_actions_act_view_reload: Migration to 15.0 Jun 29, 2022
@StefanRijnhart
Copy link
Member

/ocabot migration web_ir_actions_act_view_reload

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Jun 29, 2022
@OCA-git-bot OCA-git-bot mentioned this pull request Jun 29, 2022
47 tasks
@janikvonrotz
Copy link

@StefanRijnhart I was trying to setup project_timesheet_time_control using this and other PRs:

# web_ir_actions_act_view_reload
cd oca/web
gh pr checkout 2240
../..
# hr_timesheet_task_stage
cd oca/timesheet
gh pr checkout 500
../..
# project_timesheet_time_control
cd oca/project
gh pr checkout 939
../..

For some reason the action ir_actions_act_view_reload cannot be loaded.

grafik

@StefanRijnhart
Copy link
Member

@janikvonrotz That would be useful feedback to the author of this PR, @manuelcalerosolis

@janikvonrotz
Copy link

@manuelcalerosolis The client throws this error:

UncaughtPromiseError
Uncaught Promise > The ActionManager service can't handle actions of type ir.actions.act_view_reload
Error: The ActionManager service can't handle actions of type ir.actions.act_view_reload
    doAction@http://localhost:8069/web/assets/debug/web.assets_backend.js:24916:23 (/web/static/src/webclient/actions/action_service.js:1132)

@StefanRijnhart
Copy link
Member

Wow, it looks like the entry point _handleAction does not exist in Odoo 15 anymore (odoo/odoo@0573aca#diff-b4ba6932eee92edebdb85d63cbd875c0af5bce6532286faa30de6586f72c1cc5), and was replaced by https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/webclient/actions/action_service.js#L1106-L1137.

@manuelcalerosolis did this code work for you locally on Odoo 15?

@manuelcalerosolis
Copy link
Contributor Author

Wow, it looks like the entry point _handleAction does not exist in Odoo 15 anymore (odoo/odoo@0573aca#diff-b4ba6932eee92edebdb85d63cbd875c0af5bce6532286faa30de6586f72c1cc5), and was replaced by https://github.com/odoo/odoo/blob/15.0/addons/web/static/src/webclient/actions/action_service.js#L1106-L1137.

@manuelcalerosolis did this code work for you locally on Odoo 15?

@StefanRijnhart I also get the error when starting a timesheet within HelpDesk with the "Start Work" button.

I really don't know what change I have to incorporate in the javascript module so that it works correctly in 15.0

@StefanRijnhart
Copy link
Member

Then maybe you should leave the migration of this module to someone else.

@manuelcalerosolis
Copy link
Contributor Author

Then maybe you should leave the migration of this module to someone else.

Sure.

Maybe that person is you.

@janikvonrotz
Copy link

@StefanRijnhart Is there really no alternative in v15?

Something like: {"type": "ir.actions.client", "tag": "reload"}

@pedrobaeza
Copy link
Member

Superseded by #2272

@pedrobaeza pedrobaeza closed this Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.