[MIG][13.0] report_xml: Migration to 13.0

This commit is contained in:
Tatiana Deribina
2019-12-23 15:49:33 +02:00
committed by Enric Tobella
parent e2869482c9
commit 9df5049644
21 changed files with 428 additions and 125 deletions

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="demo_report_xml_view">
<root>
<user t-foreach="docs" t-as="doc">
<id t-esc="doc.id" />
<name t-esc="doc.name" />
<vat t-esc="doc.vat" />
</user>
</root>
</template>
</odoo>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="root_type"/>
<xs:complexType name="root_type">
<xs:sequence>
<xs:element name="user"
type="user_type"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="user_type">
<xs:sequence>
<xs:element name="id" type="xs:int"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="vat" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="demo_report_xml_view">
<root>
<user t-foreach="docs" t-as="doc">
<name t-esc="doc.name"/>
<vat t-esc="doc.vat"/>
</user>
</root>
</template>
<report id="demo_xml_report"
name="report_xml.demo_report_xml_view"
string="Demo xml report"
report_type="qweb-xml"
print_report_name="'Demo xml report'"
file="report_xml.xml"
model="res.company"/>
<report
id="demo_xml_report"
name="report_xml.demo_report_xml_view"
string="Demo xml report"
report_type="qweb-xml"
print_report_name="'Demo xml report'"
model="res.company"
/>
<!--
In case of demo data next definition will not work. So it just example
how it should look. If report is a part of demo data you will need
add file to report instance via `post_install_hook`
-->
<record id="demo_xml_report" model="ir.actions.report">
<field name="xsd_schema" type="base64" file="report_xml/demo/demo_report.xsd" />
</record>
</odoo>