跳至内容
菜单
此问题已终结
1 回复
2172 查看

Looking for some help setting up an automated action that will create a pop-up note as a reminder to the user that a certain condition has been met. I have the logic in the automated action set up how I need it, but I cannot figure out how to create the pop-up message. 

I have tried the raise UserError("message") function which works, but does not allow you to continue with the operation if desired. Ideally this would be a popup note that would allow you to hit OK and continue with the process. The logic is on a field service task where the Assignee does != a particular warehouse. Sometimes this is acceptable and sometimes it is not acceptable for our processes, but I want to be able to inform the user of this discrepancy incase it is an error in setting up the task.

I have found other posts that mention using a Wizard to accomplish this, but I am unsure how to set this up. Any help is greatly appreciated.

形象
丢弃
最佳答案

Hi,

You can create a pop up wizard. This will continue the process and show only warning.Please refer to this forum answer to understand more:

https://www.odoo.com/forum/help-1/how-can-i-make-a-popup-warning-message-93419

Another way is to return display notification at the end of function:return {
                'type': 'ir.actions.client',
                'tag': 'display_notification',
                'params': {
                    'title': _(
                        "Your title.",
                    ),
                    'type': 'success',
                    'sticky': False,
                    'next': {'type': 'ir.actions.act_window_close'},
                },
            }
Don't forget to give the 'next' key to continue the process.


Hope it helps

形象
丢弃
相关帖文 回复 查看 活动
2
2月 19
3706
3
10月 24
2269
0
4月 24
999
0
1月 23
1403
2
12月 19
8665