@api.multi
def generate_purchase_history(self):
action = self.env.ref('purchase.action_purchase_line_product_tree')
domain="[('product_id', '=', self.product_id)]"
return {
'name': action.name,
'help': action.help,
'type': action.type,
'view_type': action.view_type,
'view_mode': action.view_mode,
'target': action.target,
'res_model': action.res_model,
'domain': domain
}
in view file i have created a button and type is object.
Post bug here https://github.com/odoo/odoo/issues/new