I understand how a button calls a method defined on a model
But what should I write in the method to open a specific view ?
Could I see any example ?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I understand how a button calls a method defined on a model
But what should I write in the method to open a specific view ?
Could I see any example ?
Thanks
Hi ,
Refer this to open form view on a button click
def action_view_invoice(self):
return {
'name': _('Customer Invoice'),
'view_mode': 'form',
'view_id': self.env.ref('account.view_move_form').id,
'res_model': 'account.move',
'context': "{'move_type':'out_invoice'}",
'type': 'ir.actions.act_window',
'res_id': self.account_move.id,
}
Thank you, Kiran and Niyas
Appreciated
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
0
Okt. 19
|
3003 | ||
|
2
Juli 15
|
6476 | ||
|
2
Jan. 20
|
5620 | ||
|
3
März 15
|
10271 | ||
|
1
Nov. 18
|
19084 |
Refer this: https://www.youtube.com/watch?v=QpzBdLWEWsE