Skip to content

Conversation

sergioM-S73
Copy link

@sergioM-S73 sergioM-S73 commented Aug 28, 2025

1 - When creating an "ir.actions.act_window.message" and clicking on the buttons, this error appears:

image

I have refactored the component to use "useService" for ORM, removing the use of env.services.rpc

2 - After, testing with an ir_actions_act_window_message in sale.order, which contains a button that triggers the action_confirm action, I encountered this error.

image

This happens because if the page is refreshed within the form view of the sale.order, the context of the list view is lost, so when the switchView function is called, it executes this code:

image

In this case, the controllerStack array contains a list view, but it doesn't contain the view field.

image

If we access the sale.order form view directly from the list view without refreshing the page, the controllerStack array correctly contains the list view information.

image

The _refreshWidget function has been modified to prevent this error when the user refreshes the page in the form view, and it now triggers a window.location.reload() to maintain functionality.

@sergioM-S73 sergioM-S73 force-pushed the 18.0-fix-web_ir_actions_act_window_message branch from cce3746 to 2fe09fb Compare August 28, 2025 11:40
@sergioM-S73 sergioM-S73 changed the title fix-error: env.services.rpc is not a function [18.0][FIX] web_ir_actions_act_window_message: env.services.rpc is not a function Aug 28, 2025
@sergioM-S73 sergioM-S73 force-pushed the 18.0-fix-web_ir_actions_act_window_message branch 2 times, most recently from b145a94 to 4b373aa Compare August 28, 2025 15:48
@sergioM-S73
Copy link
Author

sergioM-S73 commented Sep 17, 2025

@yvaucher @miguel-S73 When using this module I get this errors, can you review it??

@sergioM-S73 sergioM-S73 force-pushed the 18.0-fix-web_ir_actions_act_window_message branch from 4b373aa to ae7f587 Compare September 18, 2025 10:02
@sergioM-S73 sergioM-S73 force-pushed the 18.0-fix-web_ir_actions_act_window_message branch from ae7f587 to 5bb7c4b Compare September 18, 2025 10:08
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.

1 participant