Odoo Help


[SOLVED] What do I have to write in attribute name when calling a report?

Juan Formoso
on 10/30/14, 6:43 AM 846 views

Simple question: I am trying to generate a simple XML report. I compared the code of several modules which do that, but I am not able to undestand what I have to write in the property name. I tried a lot of things comparing to the other files, but no one was succesful, because I am always getting this error:

except_osv: (u'report.what_I_write_in_name', (<type 'exceptions.KeyError'>, KeyError(u'report.what_I_write_in_name',), <traceback object at 0x7f21302f4f80>))

The name of my module is res_partner_extended. It has a folder called report, and inside it I have the XML file reports.xml, which indicates the reports to use. Here is where I have the code which generates the error:

        <report id="report_res_partner_link_category_history"
                string="Inade links"
                xml="res_partner_extended/report/res_partner_link_category_history.xml" />

Still inside the folder report, I also have the XML file with the content of the report (to be displayed). Its name is res_partner_link_category_history.xml.

What do I have to write in name? Thank you in advance.


Ben Bernard

--Ben Bernard--

| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 10/31/14, 1:12 AM

The name is name of the report you defined in your report .py file after the "report." string. So, you have to check your corresponding report python file.

So, I have this in the .py : report_sxw.report_sxw('report.rplc_history', 'res.partner.link.category', 'addons/res_partner_extended/report/res_partner_link_category.rml', parser="res_partner_link_category_history", header="external")..... I have to write rplc_history as the name?

Juan Formoso
on 10/31/14, 10:34 AM


Ben Bernard
on 11/2/14, 8:41 PM

Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 10/30/14, 9:25 AM

I have a working module for internal use which has this: name="my_module_name.my_reports_template_id". Have you tried that?


BTW, this is for a qweb report definition in V8

Thank you Ludo! No, I hadn't tried with that one yet. But, what is exactly the report template id?

Juan Formoso
on 10/30/14, 10:36 AM

In the case of qweb you create an XML for your report. It starts with the tag something like . That is the one I mean in this case. Could be different for other reports.

21south, Ludo - 21South
on 10/30/14, 11:47 AM

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: 10/30/14, 6:43 AM
Seen: 846 times
Last updated: 3/16/15, 8:10 AM