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.

1

ParseError: registry.py", line 101, in __getitem__ ?

By
Abdullah Sofan
on 12/22/14, 10:38 AM 1,301 views

 

When I install the module it works fine. But when I click "upgrade", I am getting this error :
 

  File "C:\Program Files (x86)\Odoo 8.0-20141221\server\.\openerp\modules\registry.py", line 101, in __getitem__

ParseError: "report.paperformat" while parsing file:///C:/Program Files (x86)/Odoo 8.0-20141221/server/openerp/addons/academy/pf.xml:4, near 

=============================================================================

 

Here is my code: 

<?xml version="1.0"?>

<openerp>

<data>

    <record id="paperformat_euro_lowmargin_landscape" model="report.paperformat">   <!-- this is where the error comes from but I don't see a problem anywhere -->

        <field name="name">European A4 low margin Landscape</field>

        <field name="default" eval="True" />

        <field name="format">A4</field>

        <field name="page_height">0</field>

        <field name="page_width">0</field>

        <field name="orientation">Landscape</field>

        <field name="margin_top">5</field>

        <field name="margin_bottom">5</field>

        <field name="margin_left">5</field>

        <field name="margin_right">5</field>

        <field name="header_line" eval="False" />

        <field name="header_spacing">0</field>

        <field name="dpi">80</field>

    </record>

   

    <record id="paperformat_euro_lowmargin" model="report.paperformat">

        <field name="name">European A4 low margin</field>

        <field name="default" eval="True" />

        <field name="format">A4</field>

        <field name="page_height">0</field>

        <field name="page_width">0</field>

        <field name="orientation">Portrait</field>

        <field name="margin_top">5</field>

        <field name="margin_bottom">5</field>

        <field name="margin_left">5</field>

        <field name="margin_right">5</field>

        <field name="header_line" eval="False" />

        <field name="header_spacing">0</field>

        <field name="dpi">80</field>

    </record>

   

    <report

        id="action_report_students"

        model="intrac.students"

        string="Students Report"

        report_type="qweb-pdf"

        name="academy.report_students"

        file="academy.report_students"

    />

    <record id="action_report_students" model="ir.actions.report.xml">

        <field name="paperformat_id" ref="academy.paperformat_euro_lowmargin"/>

    </record>

 

    <report

        id="action_batch_attendance"

        model="intrac.batches"

        string="Batch Attendance Report"

        report_type="qweb-html"

        name="academy.batch_attendance"

        file="academy.batch_attendance"

    />

    <record id="action_batch_attendance" model="ir.actions.report.xml">

        <field name="paperformat_id" ref="academy.paperformat_euro_lowmargin_landscape"/>

    </record>

</data>

</openerp>

 

 

You are right zbik. Thanks a billion. If I may ask, how did you get to know this information?

Abdullah Sofan
on 12/22/14, 11:34 AM

I do not understand what you're asking?

zbik
on 12/22/14, 11:46 AM
2

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 12/22/14, 11:40 AM

You have

'depends': ['report']

in __openerp__py?

You are right zbik. Thanks a billion. If I may ask, how did you get to know this information?

Abdullah Sofan
on 12/22/14, 11:48 AM
1
Abdullah Sofan
On 12/22/14, 11:45 AM

Thanks to Zbik it turns out the problem was that I had to add 'report' in the depends tag of __openerp__.py. 
 

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: 12/22/14, 10:38 AM
Seen: 1301 times
Last updated: 3/16/15, 8:10 AM