Odoo Help


printing invoice error

Ibercalidad Ingenieros SA
on 4/15/13, 2:42 PM 2,006 views


I have a problem printing invoices, every time I take a imprimr invoice shows the following error

'NoneType' object has no attribute 'data'

(<type 'exceptions.attributeerror'="">, AttributeError("'NoneType' object has no attribute 'data'",), <traceback object="" at="" 0x7f79a8229c20="">)



| 4 4 8
Ahmedabad, India

Odoo Expert

On 4/16/13, 3:49 AM

Maybe there is a problem in wizard or in your rml file you are using data to fetch desired values, try to just print [[ data ]].If it does not print anything,then there is a problem in wizard. Are you generating report by wizard? Because if you generating report by wizard, the wizard method returns the dictionary of the following keys & values : Suppose wizard method is like this,

def print_report(self, cr, uid, ids, context=None):
         To get the date and print the report
         @param self: The object pointer.
         @param cr: A database cursor
         @param uid: ID of the user currently logged in
         @param context: A standard dictionary
         @return: return report
        if context is None:
            context = {}
        datas = {'ids': context.get('active_ids', [])}

        res = self.read(cr, uid, ids, ['employee_ids',  'date_from', 'date_to', 'salary_on'], context=context)
        res = res and res[0] or {}
        datas['form'] = res
        datas['ids'] = res.get('employee_ids',[])
        return {
            'type': 'ir.actions.report.xml',
            'report_name': 'year.salary',
            'datas': datas,

In datas we have passed employee_ids, datas must consists list of ids. Maybe this will help you.


Hello again does not work if I press the preview button in the page header company information same if I new database, use OpenERP 7 with the latest nightly build


Are you using base_report_designer module for report? Are you trying to open pdf report? Have you use word [[ data ]] in your rml file?

on 4/17/13, 3:34 AM

Hello can not find any rml file in the folder of my installation, only the branch addons

Ibercalidad Ingenieros SA
on 4/17/13, 1:50 PM

creo que el problema viene de ReportLab, el archivo utils.py no recibe datos para convertir en pdf puede ser?

Ibercalidad Ingenieros SA
on 4/17/13, 2:53 PM

sorry, I think the problem comes from ReportLab, utils.py file not receive data to convert into pdf may be?

Ibercalidad Ingenieros SA
on 4/17/13, 2:57 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/15/13, 2:42 PM
Seen: 2006 times
Last updated: 3/16/15, 8:10 AM