Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def print_report(self, cr, uid, ids, context=None):
- active_id = context.get('active_id', [])
- datas = {'ids' : [active_id]}
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'pos.receipt', # mention your report name here
- 'datas': datas,
- }
- <button name="generate_report" type="object" string="Generate report"/>
- @api.multi
- def generate_report(self):
- return {
- 'type': 'ir.actions.report.xml',
- 'report_name': 'myModule.my_report'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement