Use separate XML files for views

This commit is contained in:
Cédric Krier
2013-03-07 20:21:14 +01:00
parent e8e146486d
commit b809a1fd74
4 changed files with 20 additions and 21 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 -20
View File
@@ -8,26 +8,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="model">company.company</field>
<field name="type">form</field>
<field name="inherit" ref="company.company_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/form/notebook/page[@id=&quot;general&quot;]"
position="after">
<page string="Work Time" id="work_time">
<label name="hours_per_work_day"/>
<field name="hours_per_work_day"/>
<label name="hours_per_work_week"/>
<field name="hours_per_work_week"/>
<label name="hours_per_work_month"/>
<field name="hours_per_work_month"/>
<label name="hours_per_work_year"/>
<field name="hours_per_work_year"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">company_form</field>
</record>
</data>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_company_work_time',
],
package_data={
'trytond.modules.company_work_time': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+17
View File
@@ -0,0 +1,17 @@
<?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/page[@id='general']" position="after">
<page string="Work Time" id="work_time">
<label name="hours_per_work_day"/>
<field name="hours_per_work_day"/>
<label name="hours_per_work_week"/>
<field name="hours_per_work_week"/>
<label name="hours_per_work_month"/>
<field name="hours_per_work_month"/>
<label name="hours_per_work_year"/>
<field name="hours_per_work_year"/>
</page>
</xpath>
</data>