-
-
Notifications
You must be signed in to change notification settings - Fork 91
[18.0][MIG] endpoint_route_handler: Migration to 18.0 #69
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
[18.0][MIG] endpoint_route_handler: Migration to 18.0 #69
Conversation
52c406f to
2f0075e
Compare
|
Thanks for this module @simahawk, please let me know if everything is fine |
|
/ocabot migration endpoint_route_handler |
|
Thanks for your work! |
I'm no really sure, because in version 16 you have a class method, then in 17 version is a regular function, maybe we can include after forward ported to 17 version I can include in this MR, wdyt? |
|
Sure, we have to port all changes to v17 first. You can try https://github.com/OCA/oca-port 😉 |
|
And there's a fix for it that just landed in 16 #77 |
When an endpoint is archived it must be dropped. When it's unarchive it must be restored.
Routing maps are generated **per env** which means that every new env will have its own routing map attached to `ir.http` registry class. This is not desired (as per core Odoo comment) but it's like this today :/ Hence, before this change, the routing map could be mis-aligned across different envs leading to random responses for custom endpoints. This refactoring simplifies a lot the handling of the rules leaving to std `_generate_routing_rules` the duty to yield rules and to `routing_map` to generate them for the new route map. EndpointRegistry memory consumption is improved too thanks to smaller data to store and to the usage of __slots__.
To avoid multiple invalidation of all envs on each edit or create of persistent records, a new flag is introduced: 'registry_sync'. This flag delays the sync of the rule registry till manual action occurs. Records in the UI are decorated accordingly to notify users of the need to reflect changes on ther registry to make them effective. The sync happens in a post commit hook to ensure all values are in place for the affected records.
Currently translated at 100.0% (29 of 29 strings) Translation: web-api-16.0/web-api-16.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-16-0/web-api-16-0-endpoint_route_handler/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-api-17.0/web-api-17.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-17-0/web-api-17-0-endpoint_route_handler/
Empty group_id in acl is deprecated. see odoo/odoo@ce1a4a2
2f0075e to
31582b3
Compare
simahawk
left a comment
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.
I'd like to get rid of the .tool as I've found an alternative but I don't have time to provide specs now... and this is blocking other modules.
Thanks!
|
/ocabot merge nobump |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 6e3a9a3. Thanks a lot for contributing to OCA. ❤️ |
|
FYI for existing records you must force sync otherwise the new param Manual work around:
@lmignon maybe you need that for existing fastapi.endpoint too |
Supersed #65
Added parameter readonly in route definition, by default false to keep standard behavior