Wednesday 1 February 2017

How To reload page on click button in openerp/odoo

How To reload page on click button in openerp/odoo



You have to add button in form view like below code.
<xpath expr="//field[@name='name']" position="after">
            <button name="refresh_page" string="Refresh" type="object"/>
        </xpath>

You have to create one method like below.(this mehtod call when you click on button)

@api.multi
        def refresh_page(self):
            return { 'type': 'ir.actions.client', 'tag': 'reload'}

1 comment:

  1. Odoo partner
    Thanks for sharing this informative article. This content is very useful.
    Odoo Partners

    ReplyDelete

Odoo 17 New Features

  Odoo 17 new Features 1) Duplicate  multiple records from List view. Please have look below screenshots first you need to select records th...