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,
}
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
0
oct. 19
|
3717 | |||
|
2
juil. 15
|
7409 | |||
|
2
janv. 20
|
6354 | |||
|
3
mars 15
|
11265 | |||
|
1
nov. 18
|
20283 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Refer this: https://www.youtube.com/watch?v=QpzBdLWEWsE