Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. def print_report(self, cr, uid, ids, context=None):
  2. active_id = context.get('active_id', [])
  3. datas = {'ids' : [active_id]}
  4. return {
  5. 'type': 'ir.actions.report.xml',
  6. 'report_name': 'pos.receipt', # mention your report name here
  7. 'datas': datas,
  8. }
  9.  
  10. <button name="generate_report" type="object" string="Generate report"/>
  11.  
  12. @api.multi
  13. def generate_report(self):
  14.  
  15. return {
  16. 'type': 'ir.actions.report.xml',
  17. 'report_name': 'myModule.my_report'
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement