Odoo - prevent button from closing wizard

后端 未结 6 1963
死守一世寂寞
死守一世寂寞 2020-12-29 11:54

I have a transient model that serves as a dialog. In my form view I have a button like this:

6条回答
  •  遥遥无期
    2020-12-29 12:20

    The simplest this to do is :

    @api.multi
    def null_action(self):
        return {
            "type": "set_scrollTop",
        }
    

    As the type is used to call any method on the class ActionManager (javascript)

    It's better than "type": "ir.actions.do_nothing" which generate an exception (this attribute doesn't exist)

提交回复
热议问题