Use separate XML files for views

This commit is contained in:
Cédric Krier committed 2013-03-02 15:46:20 +01:00
1 parent 0b2dd7a878
commit 2ff4db30a6
5 files changed
+54 -53

No files matched your search

+1
View File
@@ -6,5 +6,6 @@ include CHANGELOG
include LICENSE
include tryton.cfg
include *.xml
include view/*.xml
include *.odt
include locale/*.po
+2 -52
View File
@@ -7,63 +7,13 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="category_view_form">
<field name="model">product.category</field>
<field name="inherit" ref="product.category_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/form/notebook/page[@id=&quot;childs&quot;]"
position="before">
<page string="Accounting" col="4" id="accounting">
<separator string="Accounts" id="accounts" colspan="4"/>
<label name="account_parent"/>
<field name="account_parent"/>
<newline/>
<label name="account_revenue"/>
<field name="account_revenue"/>
<label name="account_expense"/>
<field name="account_expense"/>
<separator string="Taxes" id="taxes" colspan="4"/>
<label name="taxes_parent"/>
<field name="taxes_parent"/>
<newline/>
<field name="customer_taxes" colspan="2"/>
<field name="supplier_taxes" colspan="2"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">category_form</field>
</record>
<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/page[@id=&quot;general&quot;]"
position="after">
<page string="Accounting" col="4" id="accounting">
<separator string="Accounts" id="accounts" colspan="4"/>
<label name="account_category"/>
<field name="account_category"/>
<newline/>
<label name="account_revenue"/>
<field name="account_revenue"/>
<label name="account_expense"/>
<field name="account_expense"/>
<separator string="Taxes" id="taxes" colspan="4"/>
<label name="taxes_category"/>
<field name="taxes_category"/>
<newline/>
<field name="customer_taxes" colspan="2"/>
<field name="supplier_taxes" colspan="2"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">template_form</field>
</record>
</data>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_account_product',
],
package_data={
'trytond.modules.account_product': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+25
View File
@@ -0,0 +1,25 @@
<?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='childs']"
position="before">
<page string="Accounting" col="4" id="accounting">
<separator string="Accounts" id="accounts" colspan="4"/>
<label name="account_parent"/>
<field name="account_parent"/>
<newline/>
<label name="account_revenue"/>
<field name="account_revenue"/>
<label name="account_expense"/>
<field name="account_expense"/>
<separator string="Taxes" id="taxes" colspan="4"/>
<label name="taxes_parent"/>
<field name="taxes_parent"/>
<newline/>
<field name="customer_taxes" colspan="2"/>
<field name="supplier_taxes" colspan="2"/>
</page>
</xpath>
</data>
+25
View File
@@ -0,0 +1,25 @@
<?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="Accounting" col="4" id="accounting">
<separator string="Accounts" id="accounts" colspan="4"/>
<label name="account_category"/>
<field name="account_category"/>
<newline/>
<label name="account_revenue"/>
<field name="account_revenue"/>
<label name="account_expense"/>
<field name="account_expense"/>
<separator string="Taxes" id="taxes" colspan="4"/>
<label name="taxes_category"/>
<field name="taxes_category"/>
<newline/>
<field name="customer_taxes" colspan="2"/>
<field name="supplier_taxes" colspan="2"/>
</page>
</xpath>
</data>