in odoo there are more than one type of button and action button is one of them , so what is an action button ?
An action button is button which be create to call another view , and we can create it by following the steps bellow
- create the button in xml file as
<button name="module_name.view_button_action" icon="fa-check" type="action" string="Graduated Students" />
- create view_graduated_students function as
@api.multi
def view_button_action(self):
return {
'name': _('ModelName'),
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'model.model',
'view_id': False,
'type': 'ir.actions.act_window',
'domain': [],
}
'name': _('ModelName'),
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'model.model',
'view_id': False,
'type': 'ir.actions.act_window',
'domain': [],
}
No comments:
Post a Comment