-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[16.0][MIG] web_ir_actions_act_window_page #2548
[16.0][MIG] web_ir_actions_act_window_page #2548
Conversation
2d9349d
to
f5b8329
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot migration web_ir_actions_act_window_page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is beautifully adapted to the new upstream code. The use of the bus is revealing.
Please fix the commit messages.
patch(Pager.prototype, "navigate event listener", { | ||
setup() { | ||
this._super.apply(); | ||
const handleNavigate = (ev) => this._handleNavigate(ev); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
random unsolicited code review. I hope it's not rude. You can import useBus
from "@web/core/utils/hooks"
. It allow you to register when mounted and it will take care of unregistering when unmounted:
useBus(this.env.bus, "pager:navigate", handleNavigate);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on the contrary, very much appreciated and sorry for the long delay! Took your suggestion in 3a0e116
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
3a0e116
to
0cf9d4c
Compare
0cf9d4c
to
06c1460
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at ba22257. Thanks a lot for contributing to OCA. ❤️ |
This addon allows a developer to return the following action types:
{'type': 'ir.actions.act_window.page.next'}
or:
{'type': 'ir.actions.act_window.page.prev'}
which trigger the form's controller to page into the requested direction on the client
side.
A use case could be the case of a validation flow. As a developer, you set up a tree
view with a domain on records to be validated. The user opens the first record in a form
view and validates the record. The validation method returns the 'next' action type so
that the browser window of the user is presented with the next record in the form view.