Onchange actions

Run actions from onchange handlers

Technical Name:
web_onchange_action
Version:
8.0
License:
Author:
Therp BV
Website:
https://odoo-community.org/web/image/product.template/4396/image_1920?unique=789477a
  • Odoo Version

Terms and Conditions 

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.

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products