Odoo Help


Odoo Qweb Reports problems

Mostafa Mohamed Abdel Monaem
on 2/28/15, 9:30 AM 2,537 views

Hi there i need help here grin emoticon

i need to get values from function get_timetable but when i want to print the report it says
QWebException: "'NoneType' object is not callable" while evaluating


    import time
    from openerp import  osv
    from openerp.report import report_sxw
    class timetable_info(report_sxw.rml2sxw):
        def __init__(self, cr, uid, name, context=None):
            super(timetable_info, self).__init__(cr, uid, name, context=context)
                'time': time,
        def _get_timetable(self, timetable_id):
            self.cr.execute(" select t.start_time,t.end_time,s.name,week_day,r.name as"
                            " teacher from fci_time_table_line t, fci_subject_subject s, resource_resource r, "
                            "hr_employee hr where t.subject_id= s.id and t.teacher_id= hr.id  and "
                            "hr.resource_id = r.id  and table_id = %d group by start_time,end_time,s.name,week_day,r.name"
                            " order by start_time"%(timetable_id.id))
            res = self.cr.dictfetchall()
            self.cr.execute("select start_time,end_time from fci_time_table_line where table_id=%d group by start_time,end_time  order by start_time"%(timetable_id.id))
            time_data = self.cr.dictfetchall()
            for time_detail in time_data:
                for data in res:
                    if time_detail['start_time']==data['start_time'] and time_detail['end_time']==data['end_time']:
                        if (data['name']=='Recess'):
                            time_detail[data['week_day']] = data['name']
                            time_detail[data['week_day']] = data['name']+ '\n(' +data['teacher']+')'
            return timetable_detail
    class report_time_table(osv.AbstractModel):
        _name = 'FCI_ERP.timetable_report_document'
        _inherit = 'report.abstract_report'
        _template = 'FCI_ERP.timetable_report_document'
        _wrapped_report_class = timetable_info

and here it is my report view in XML

     <table class="gridtable center">
    <tr t-foreach="get_timetable(o)" t-as="a">
    <span t-esc=" a['start_time'] - a['end_time']"/>
    <span t-esc="a['saturday'] "/>
    <span t-esc="o['sunday']"/>


Edited any help ?

Mostafa Mohamed Abdel Monaem
on 3/3/15, 3:32 PM

your depends in __openerp__.py?

on 3/3/15, 3:36 PM


Mostafa Mohamed Abdel Monaem
on 3/3/15, 4:40 PM

ok thanks ,, i have another question,,i'm new and i don't know what i do write or not in xml ? to get the values by this function,,thanks in advance

Mostafa Mohamed Abdel Monaem
on 3/3/15, 4:45 PM

@Emipro Technologies Pvt. Ltd. it still same error :( QWebException: "'NoneType' object is not callable" while evaluating 'get_timetable(o)'

Mostafa Mohamed Abdel Monaem
on 3/4/15, 2:47 AM


| 6 5 7
Lodz, Poland

On 3/3/15, 4:43 PM

In __openerp__.py, try this

'depends': ['hr','report']


Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.


Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 


We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :


  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd.
On 3/4/15, 2:13 AM


You just need to change one thing as like below.

class timetable_info(report_sxw.rml_parse):
        def __init__(self, cr, uid, name, context=None):
            super(timetable_info, self).__init__(cr, uid, name, context=context)
                'time': time,

Here you just need to change inherited class name. I hope it will work.


Still same problem :(

QWebException: "'NoneType' object is not callable" while evaluating


1) you enable debug and verify execution timetable_info(). Executed or no? 2) report call definition in xml? 3) v7 or v8?

on 3/3/15, 5:01 PM

No i don't enable debug mode i edit the code and upgrade if the module still have same error i reinstall and so... yea i follow that guide http://blog.emiprotechnologies.com/create-qweb-report-odoo/... odoo-V8

Mostafa Mohamed Abdel Monaem
on 3/3/15, 5:06 PM

so did you find the solution ??

Alaa Ahmed
on 6/5/17, 6:37 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

2 follower(s)


Asked: 2/28/15, 9:30 AM
Seen: 2537 times
Last updated: 4/8/15, 3:13 PM