Odoo Help

Welcome!

This community 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.

0

Error webkit report: 'Undefined' object is not callable

By
sama
on 8/13/15, 2:16 AM 338 views

sale_report.py::


import time

from report import report_sxw

from osv import osv

class psale(report_sxw.rml_parse):

def __init__(self, cr, uid, name, context=None):

super(psale, self).__init__(cr, uid, name, context=context)

self.localcontext.update({

'time': time,

'cr':cr,

'uid': uid,

'getname': self._getname,

})

self.context = context

def _getname(self,section_id):

sql="select res.name from res_users as res,crm_case_section as ccs \

where res.id=ccs.user_id and ccs.id=%d" %(section_id)

self.cr.execute(sql)

return self.cr.fetchall()

report_sxw.report_sxw('report.sa.quot.re',

'sale.order',

'addons/lunch/sale_report/sale_report.mako', parser=psale,

)

------------------------------------------------------------------------------------------------------

sale_report.mako:::


<% tb=getname(usr.section_id) %>

${tb}

----------------------

too, import sale_report  in __init__.py  , restart server

please help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 8/13/15, 2:16 AM
Seen: 338 times
Last updated: 8/13/15, 2:16 AM