Skip to content

Latest commit

 

History

History
 
 

web_onchange_action

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
License: AGPL-3

Onchange actions

This module allows you to return an action (ir.actions.*) from an onchange handler.

This way, you can have much more elaborate message boxes or simply show a whole wizard or do whatever else is possible with actions on the client side.

Usage

Depend on this module and in your onchange handler, add a key action to the warning dictionary of the result which contains the definition of an action to execute:

{
    'value': ....,
    'domain': ....,
    'warning': {
        'title': 'This will be shown if this module is not available',
        'message': 'Fallback message, see above',
        # this module picks up this key and shows it *instead* of the
        # warning above
        'action': {
            'type': 'ir.actions.act_window',
            'res_model': 'my.wizard',
            ...
        },
}

The module web_ir_actions_act_window_message can be quite helpful here.

Try me on Runbot

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Images

  • Odoo Community Association: Icon.

Contributors

Do not contact contributors directly about help with questions or problems concerning this addon, but use the community mailing list or the appropriate specialized mailinglist for help, and the bug tracker linked in Bug Tracker above for technical issues.

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.