i worked with Base report xlsx and i want to receive data from my wizard in generate excel methode like this:
try:
from openerp.addons.report_xlsx.report.report_xlsx import ReportXlsx
except ImportError:
class ReportXlsx(object):
def __init__(self, *args, **kwargs):
pass
class PartnerXlsx(ReportXlsx):
def generate_xlsx_report(self, workbook, data, partners):
for obj in partners:
report_name = obj.name
# One sheet by partner
sheet = workbook.add_worksheet(report_name[:31])
bold = workbook.add_format({'bold': True})
sheet.write(0, 0, obj.name, bold)
how can i receive data from my custum wizard here
PartnerXlsx('report.res.partner.xlsx', 'res.partner')
how can i receive data from my custum wizard here
PartnerXlsx('report.res.partner.xlsx', 'res.partner')
so , i found the answer here:
https://www.odoo.com/fr_FR/forum/aide-1/question/odoo-10-xls-or-xlsx-report-122190
def print_xls_report(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids)[0]
return {'type': 'ir.actions.report.xml',
'report_name': 'account_excel_report.report_bilan.xlsx',
'datas': data
}
then
def generate_xlsx_report(self, workbook, data, lines):
sheet = workbook.add_worksheet('test')
sheet.write('C15', data['field_wizard'], bold)
....