Use separate XML files for views

This commit is contained in:
Cédric Krier
2013-03-10 17:30:20 +01:00
parent b04d52d1ad
commit 311e46e30b
4 changed files with 25 additions and 26 deletions
+1
View File
@@ -6,6 +6,7 @@ include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
include *.odt
include locale/*.po
include doc/*
+1 -25
View File
@@ -7,31 +7,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="inherit" ref="product.template_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/form/notebook"
position="inside">
<page string="Measurements" col="3" id="measurements"
states="{'invisible': Eval('type').in_(['service'])}">
<label name="length"/>
<field name="length"/>
<field name="length_uom"/>
<label name="height"/>
<field name="height"/>
<field name="height_uom"/>
<label name="width"/>
<field name="width"/>
<field name="width_uom"/>
<label name="weight"/>
<field name="weight"/>
<field name="weight_uom"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">template_form</field>
</record>
</data>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_product_measurements',
],
package_data={
'trytond.modules.product_measurements': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook" position="inside">
<page string="Measurements" col="3" id="measurements"
states="{'invisible': Eval('type').in_(['service'])}">
<label name="length"/>
<field name="length"/>
<field name="length_uom"/>
<label name="height"/>
<field name="height"/>
<field name="height_uom"/>
<label name="width"/>
<field name="width"/>
<field name="width_uom"/>
<label name="weight"/>
<field name="weight"/>
<field name="weight_uom"/>
</page>
</xpath>
</data>