How to Open a Form View on Button Click in Odoo 15 | Odoo 15 Development Tutorials – CBMS Odoo ERP

How to Open a Form View on Button Click in Odoo 15 | Odoo 15 Development Tutorials – CBMS Odoo ERP

1
0 minutes, 27 seconds Read

This video is about how to open a form view while clicking a button. On the button action we can return the view we need to open like this.
#odootechnicalvideos #odoovidoes #odoo15developmentvideos

Here we can pass our model to ‘res_model’ and the particular view to ‘view_id’
def my_button(self):
return {
‘name’: “Your String”,
‘type’: ‘ir.actions.act_window’,
‘view_type’: ‘form’,
‘view_mode’: ‘form’,
‘res_model’: ‘object’,
‘view_id’: self.env.ref(‘module.view_id’).id,
‘target’: ‘new’
}

#Open #Form #View #Button #Click #Odoo #Odoo #Development #Tutorials

Similar Posts

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *