Skip to Content
Menu
This question has been flagged
2393 Views

how to generate xlsx file on odoo 12.0 using a piece of code that works fine on odoo 11.0
I couldn't find report_xlsx module for odoo 12 anywhere so I installed report_xlsx for odoo 11.0

when I execute the piece of code on Odoo 12.0, nothing happens. no error messages in the logs.

It works fine on odoo 11.0 though.

here is the code:

def print_report_xlsx(self):

active_ids = self.env.context.get('active_ids', [])
data = {
'ids': active_ids,
'model': self.env.context.get('active_model', 'ir.ui.view'),
'form': self.read()[0]
}
    print (data)
return self.env.ref('l10n_gt_extra.action_reporte_banco_xlsx').report_action(self, data=data, config=False)

what should I change to make the code compatible with Odoo 12?


Avatar
Discard
Related Posts Replies Views Activity
2
Dec 23
12007
0
Oct 23
33
3
Oct 23
787
1
Oct 23
569
1
Aug 23
980