odoo_17.0.1/odoo/import_xml.rng

339 lines
14 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<rng:grammar xmlns:rng="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<rng:define name="env">
<rng:optional><rng:attribute name="uid" /></rng:optional>
<rng:optional><rng:attribute name="context" /></rng:optional>
</rng:define>
<rng:define name="views">
<rng:data type="string">
<rng:param name="pattern">([a-z]+(,[a-z]+)*)?</rng:param>
</rng:data>
</rng:define>
<rng:define name="any">
<rng:element>
<rng:anyName/>
<rng:zeroOrMore>
<rng:choice>
<rng:attribute>
<rng:anyName/>
</rng:attribute>
<rng:text/>
<rng:ref name="any"/>
</rng:choice>
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:define name="value">
<rng:element name="value">
<rng:optional><rng:attribute name="name" /></rng:optional>
<rng:optional><rng:attribute name="model" /></rng:optional>
<rng:choice>
<rng:attribute name="search" />
<rng:attribute name="eval" />
<rng:group>
<rng:optional><rng:attribute name="type" /></rng:optional>
<rng:choice>
<rng:attribute name="file" />
<rng:text/>
</rng:choice>
</rng:group>
</rng:choice>
<rng:optional><rng:attribute name="use" /></rng:optional>
</rng:element>
</rng:define>
<rng:define name="function">
<rng:element name="function">
<rng:attribute name="model" />
<rng:attribute name="name" />
<rng:ref name="env"/>
<rng:optional>
<rng:choice>
<rng:attribute name="eval" />
<rng:oneOrMore>
<rng:choice>
<rng:ref name="value" />
<rng:ref name="function" />
</rng:choice>
</rng:oneOrMore>
</rng:choice>
</rng:optional>
</rng:element>
</rng:define>
<rng:define name="report">
<rng:element name="report">
<rng:optional><rng:attribute name="id"/></rng:optional>
<rng:attribute name="string"/>
<rng:attribute name="model"/>
<rng:attribute name="name"/>
<rng:optional><rng:attribute name="print_report_name"/></rng:optional>
<rng:optional><rng:attribute name="report_type"/></rng:optional>
<rng:optional><rng:attribute name="multi"/></rng:optional>
<rng:optional><rng:attribute name="menu"/></rng:optional>
<rng:optional><rng:attribute name="keyword"/></rng:optional>
<rng:optional><rng:attribute name="file"/></rng:optional>
<rng:optional><rng:attribute name="xml"/></rng:optional>
<rng:optional><rng:attribute name="parser"/></rng:optional>
<rng:optional> <rng:attribute name="auto" /> </rng:optional>
<rng:optional> <rng:attribute name="header" /> </rng:optional>
<rng:optional> <rng:attribute name="attachment" /> </rng:optional>
<rng:optional> <rng:attribute name="attachment_use" /> </rng:optional>
<rng:optional> <rng:attribute name="groups"/> </rng:optional>
<rng:optional> <rng:attribute name="paperformat"/> </rng:optional>
<!-- `Usage` may help identify the best report for a certain task,
for example usage="default" for reports that are attached by
default in EDI exports -->
<rng:optional><rng:attribute name="usage"/></rng:optional>
<rng:empty />
</rng:element>
</rng:define>
<rng:define name="field">
<rng:element name="field">
<rng:attribute name="name" />
<rng:choice>
<rng:group>
<rng:attribute name="type">
<rng:choice>
<rng:value>base64</rng:value>
<rng:value>char</rng:value>
<rng:value>file</rng:value>
</rng:choice>
</rng:attribute>
<rng:choice>
<rng:group>
<rng:attribute name="file"/>
<rng:empty/>
</rng:group>
<rng:text/>
</rng:choice>
</rng:group>
<rng:group>
<rng:attribute name="type"><rng:value>int</rng:value></rng:attribute>
<rng:choice>
<rng:data type="int"/>
<rng:value>None</rng:value>
</rng:choice>
</rng:group>
<rng:group>
<rng:attribute name="type"><rng:value>float</rng:value></rng:attribute>
<rng:data type="float"/>
</rng:group>
<rng:group>
<rng:attribute name="type">
<rng:choice>
<rng:value>list</rng:value>
<rng:value>tuple</rng:value>
</rng:choice>
</rng:attribute>
<rng:oneOrMore><rng:ref name="value"/></rng:oneOrMore>
</rng:group>
<rng:group>
<rng:attribute name="type">
<rng:choice>
<rng:value>html</rng:value>
<rng:value>xml</rng:value>
</rng:choice>
</rng:attribute>
<rng:oneOrMore>
<rng:ref name="any"/>
</rng:oneOrMore>
</rng:group>
<rng:group>
<rng:attribute name="ref"/>
<rng:empty/>
</rng:group>
<rng:group>
<rng:attribute name="eval"/>
<rng:optional><rng:attribute name="model"/></rng:optional>
<rng:empty/>
</rng:group>
<rng:group>
<rng:attribute name="search"/>
<rng:optional><rng:attribute name="model"/></rng:optional>
<rng:optional><rng:attribute name="use"/></rng:optional>
<rng:empty/>
</rng:group>
<rng:text/>
<rng:zeroOrMore>
<rng:ref name="record" />
</rng:zeroOrMore>
</rng:choice>
</rng:element>
</rng:define>
<rng:define name="record">
<rng:element name="record">
<rng:optional>
<rng:attribute name="id" />
<rng:optional>
<rng:attribute name="forcecreate" />
</rng:optional>
</rng:optional>
<rng:attribute name="model" />
<rng:ref name="env"/>
<rng:zeroOrMore>
<rng:ref name="field" />
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:define name="template">
<rng:element name="template">
<rng:optional><rng:attribute name="id"/></rng:optional>
<rng:optional><rng:attribute name="t-name"/></rng:optional>
<rng:optional><rng:attribute name="name"/></rng:optional>
<rng:optional><rng:attribute name="forcecreate"/></rng:optional>
<rng:optional><rng:attribute name="context"/></rng:optional>
<rng:optional><rng:attribute name="priority"/></rng:optional>
<rng:optional><rng:attribute name="key"/></rng:optional>
<rng:optional><rng:attribute name="website_id"/></rng:optional>
<rng:optional><rng:attribute name="track"/></rng:optional>
<rng:group>
<rng:optional>
<rng:attribute name="inherit_id"/>
<rng:optional>
<rng:attribute name="primary">
<rng:value>True</rng:value>
</rng:attribute>
</rng:optional>
</rng:optional>
<rng:optional><rng:attribute name="groups"/></rng:optional>
<rng:optional><rng:attribute name="active"></rng:attribute></rng:optional>
<rng:optional><rng:attribute name="customize_show"></rng:attribute></rng:optional>
</rng:group>
<rng:zeroOrMore>
<rng:choice>
<rng:text/>
<rng:ref name="any"/>
</rng:choice>
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:define name="delete">
<rng:element name="delete">
<rng:attribute name="model" />
<rng:choice>
<rng:attribute name="id" />
<rng:attribute name="search" />
</rng:choice>
</rng:element>
</rng:define>
<rng:define name="menuitem_attrs">
<rng:attribute name="id" />
<rng:optional><rng:attribute name="name"/></rng:optional>
<rng:optional>
<rng:attribute name="sequence">
<rng:data type="int"/>
</rng:attribute>
</rng:optional>
<rng:optional><rng:attribute name="groups"/></rng:optional>
<rng:optional><rng:attribute name="active"/></rng:optional>
</rng:define>
<rng:define name="submenuitem_contents">
<rng:optional>
<rng:choice>
<rng:attribute name="action"/>
<rng:oneOrMore>
<rng:ref name="submenuitem"/>
</rng:oneOrMore>
</rng:choice>
</rng:optional>
</rng:define>
<rng:define name="menuitem">
<rng:element name="menuitem">
<rng:ref name="menuitem_attrs"/>
<rng:choice>
<!-- a root menu can have a web_icon, an action and children -->
<rng:group>
<rng:optional><rng:attribute name="web_icon"/></rng:optional>
<rng:optional><rng:attribute name="action"/></rng:optional>
<rng:zeroOrMore><rng:ref name="submenuitem"/></rng:zeroOrMore>
</rng:group>
<!-- a non-root menu can have a parent and either an action or submenus -->
<rng:group>
<rng:attribute name="parent"/>
<rng:ref name="submenuitem_contents"/>
</rng:group>
</rng:choice>
</rng:element>
</rng:define>
<rng:define name="submenuitem">
<rng:element name="menuitem">
<rng:ref name="menuitem_attrs"/>
<rng:ref name="submenuitem_contents"/>
</rng:element>
</rng:define>
<rng:define name="act_window">
<rng:element name="act_window">
<rng:attribute name="id" />
<rng:attribute name="name" />
<rng:attribute name="res_model" />
<rng:optional><rng:attribute name="domain" /> </rng:optional>
<rng:optional><rng:attribute name="context" /></rng:optional>
<rng:optional> <rng:attribute name="view_id"/> </rng:optional>
<rng:optional> <rng:attribute name="view_mode"/> </rng:optional>
<rng:optional> <rng:attribute name="target"/> </rng:optional>
<rng:optional> <rng:attribute name="groups"/> </rng:optional>
<rng:optional> <rng:attribute name="limit"/> </rng:optional>
<rng:optional> <rng:attribute name="usage"/> </rng:optional>
<rng:optional>
<rng:attribute name="binding_model"/>
<rng:optional>
<rng:attribute name="binding_type">
<rng:choice>
<rng:value>action</rng:value>
<rng:value>report</rng:value>
</rng:choice>
</rng:attribute>
</rng:optional>
<rng:optional>
<rng:attribute name="binding_views">
<rng:ref name="views"/>
</rng:attribute>
</rng:optional>
</rng:optional>
<rng:empty />
</rng:element>
</rng:define>
<rng:define name="odoo_openerp_data">
<rng:element>
<rng:choice>
<rng:name>odoo</rng:name>
<rng:name>openerp</rng:name>
<rng:name>data</rng:name>
</rng:choice>
<rng:optional><rng:attribute name="noupdate" /></rng:optional>
<rng:optional><rng:attribute name="auto_sequence" /></rng:optional>
<rng:ref name="env"/>
<rng:zeroOrMore>
<rng:choice>
<rng:text/>
<rng:ref name="odoo_openerp_data"/>
<rng:ref name="menuitem" />
<rng:ref name="record" />
<rng:ref name="template" />
<rng:ref name="delete" />
<rng:ref name="act_window" />
<rng:ref name="report" />
<rng:ref name="function" />
</rng:choice>
</rng:zeroOrMore>
</rng:element>
</rng:define>
<rng:start>
<rng:ref name="odoo_openerp_data"/>
</rng:start>
</rng:grammar>