You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23 lines
1.0 KiB

<?xml version="1.0"?>
<openerp>
<data>
<!-- TODO: put here a reminder on what to do at the first edition -->
{% for view in views -%}
<record id="{{ view.name|replace('.', '_')}}_view" model="ir.ui.view">
<field name="name">{{ view.name }}.view</field>
<field name="model">{{ view.model }}</field>
<field name="view_type">{{ view.type }}</field>
<field name="inherit_id" ref="{{ view.inherit_id.get_xml_id(cr,1,1).values()[0] }}"/>
<field name="arch" type="xml">
{# the arch given by odoo start with an xml tag that
will break the xml tree we build.
Be careful, custom field have a x_ prefix that has to be
removed
#}
{{ view.arch|replace('"', "'")|replace("<?xml version='1.0'?>", "")|replace("'x_", "'")|replace("> </field>", "/>") }}
</field>
</record>
{% endfor %}
</data>
</openerp>