Hello,
i am trying to link a custom paper format to an inherited report via xml code (in Odoo 10 community), but i am getting following error when updating my module mit -u my_module_name when starting the server.
Error:
ParseError: "null value in column "name" violates not-null constraint
DETAIL: Failing row contains (635, 1, null, 1, 2017-04-11 08:06:45.853033, null, 2017-04-11 08:06:45.853033, ir.actions.report.xml, null, null, t, pdf, null, null, null, null, null, t, null, f, null, null, null, f, null, 15, null).
" while parsing /home/odoo/customaddons/my_module/views/paperformat.xml:27, near
<record id="sale.report_saleorder_document" model="ir.actions.report.xml">
<field name="paperformat_id" ref="my_module.paperformat_sale_order"/>
</record>
and this is the code for my paper format:
<record id="paperformat_sale_order" model="report.paperformat">
<field name="name">Papier Angebot / Auftragsbestätigung / Rechnung</field>
<field name="default" eval="True"/>
<field name="format">custom</field>
<field name="page_height">297</field>
<field name="page_width">210</field>
<field name="orientation">Portrait</field>
<field name="margin_top">45</field>
<field name="margin_bottom">25</field>
<field name="margin_left">20</field>
<field name="margin_right">20</field>
<field name="header_line" eval="False"/>
<field name="header_spacing">30</field>
<field name="dpi">90</field>
</record>
and this is how i linked the paperformat to the sale order report:
<record id="sale.report_saleorder_document" model="ir.actions.report.xml">
<field name="paperformat_id" ref="my_module.paperformat_sale_order"/>
</record>
I just can't see what i did wrong here.
Any help would be greatly appreciated :)
Hope this will helps you: http://bit.ly/how-to-link-custom-paper-format-in-qweb-reports