Tuesday, October 1, 2019

Action buttons in odoo


ODOO


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': [],
        }

No comments:

Post a Comment

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...