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

shopfloor_mobile_base: Wrong menu id when odoo is called into the init state on first click on a menu #359

Closed
lmignon opened this issue Jan 18, 2022 · 1 comment · Fixed by #360
Labels
bug Something isn't working

Comments

@lmignon
Copy link
Contributor

lmignon commented Jan 18, 2022

Module

shopfloor_mobile_base.

Describe the bug

2 menus to the same scenario with an init state where odoo is called(ex location_content_transfer) with != pircking types

states: {
                init: {
                    enter: () => {
                        this.wait_call(this.odoo.call("start_or_recover"));
                    },
                },
....

Click on the fist menu. When you click on the second menu, the call to odoo is made with the menu_id of the fist menu.

To Reproduce

13.0, 14.0:

Expected behavior
Call to odoo into the init state should be made with the right menu id

Additional context
The init state is called by the router into beforeRouteUpdate. At this stage, the menu_id is not yet changed to the one for the requested new route.

@lmignon lmignon added the bug Something isn't working label Jan 18, 2022
@lmignon
Copy link
Contributor Author

lmignon commented Jan 18, 2022

ping @simahawk

lmignon added a commit to acsone/wms that referenced this issue Jan 18, 2022
…when state is loaded

The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers

fixes OCA#359
lmignon added a commit to acsone/wms that referenced this issue Jan 18, 2022
…when state is loaded

The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers

fixes OCA#359
lmignon added a commit to acsone/wms that referenced this issue Jan 18, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
JuMiSanAr pushed a commit to camptocamp/wms that referenced this issue Apr 21, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
flachica pushed a commit to flachica/wms that referenced this issue Sep 29, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
flachica pushed a commit to flachica/wms that referenced this issue Oct 7, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
flachica pushed a commit to flachica/wms that referenced this issue Oct 7, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
flachica pushed a commit to flachica/wms that referenced this issue Oct 7, 2022
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
sbejaoui pushed a commit to acsone/wms that referenced this issue Jul 28, 2023
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
brian10048 pushed a commit to brian10048/wms that referenced this issue Nov 16, 2023
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
brian10048 pushed a commit to brian10048/wms that referenced this issue Nov 22, 2023
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
lmignon added a commit to acsone/wms that referenced this issue May 2, 2024
The init state is called by the  bedoreRouteUpdate method of the router. At this stage, the new route is not yet set into the contexte and therefore, the menu item id is still the one from the previous route. To ensure that the new menu id is properly set before the init state is entered, we force the menu id to the one of the new route. Call to odoo into the enter method of the init state will be made with the right menu id into the request headers.

fixes OCA#359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant