There is an odoo with a self- writing time sheet module. Usually the reports were created through the interface menu, but how much more rational, in my opinion, is to describe them via xml in views.

Accordingly, here is an entry in the xml file:

<record id="report_person_card_id" model="ir.actions.report.xml"> <field name="name">doc print</field> <field name="model">tabel.tabel</field> <field name="report_name">person_card</field> <field name="report_type">aeroo</field> <field name="type">ir.actions.report.xml</field> <field name="in_format">oo-odt</field> <field name="tml_source">file</field> <field name="report_rml">/tabel2.odt</field> <field name="parser_state">default</field> </record> 

Unfortunately, it gives an error:

 ParseError: "Wrong value for ir.actions.report.xml.report_type: 'aeroo'" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/Tabel/views/tabel.xml:5, near <record id="report_person_card_id" model="ir.actions.report.xml"> <field name="name">doc_print</field> <field name="model">tabel.tabel</field> <field name="report_name">person_card</field> <field name="report_type">aeroo</field> <field name="type">ir.actions.report.xml</field> <field name="in_format">oo-odt</field> <field name="tml_source">file</field> <field name="report_rml">/tabel2.odt</field> <field name="parser_state">default</field> </record> 

I tried to change this type of report to standard ones: from default pdf to odt, but to no avail. I dig in the direction of addons / report_aeroo / report_aeroo.py, since this may be due to the behavior of the aeroo reports itself, but I can’t say for sure.

In general, I would appreciate any good advice. thank.

    1 answer 1

    As advised by CO in English, I added a dependency to the openerp.py of my module:

     `'depends': ["base", "report_aeroo"],` 

    Apparently, this was not enough.

    • Interesting. And why did it work if you created through the interface menu? After all, as I understand it, there was no dependency either. - OBEH