Use separate XML files for views

This commit is contained in:
Cédric Krier
2013-03-10 17:46:39 +01:00
parent 8a6d359a4b
commit 76d9fae3fb
10 changed files with 69 additions and 70 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 -12
View File
@@ -7,18 +7,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="party_view_form">
<field name="model">party.party</field>
<field name="inherit" ref="party.party_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/form/notebook/page[@id=&quot;accounting&quot;]"
position="after">
<page string="Price List" id="price_list">
</page>
</xpath>
</data>
]]>
</field>
<field name="name">party_form</field>
</record>
</data>
+5 -57
View File
@@ -7,30 +7,13 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="price_list_view_form">
<field name="model">product.price_list</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Price List">
<label name="name"/>
<field name="name"/>
<label name="company"/>
<field name="company"/>
<field name="lines" colspan="4"
view_ids="product_price_list.price_list_line_view_tree_sequence"/>
</form>
]]>
</field>
<field name="name">price_list_form</field>
</record>
<record model="ir.ui.view" id="price_list_view_tree">
<field name="model">product.price_list</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Price Lists">
<field name="name"/>
</tree>
]]>
</field>
<field name="name">price_list_tree</field>
</record>
<record model="ir.action.act_window" id="act_price_list_form">
@@ -80,55 +63,20 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="price_list_line_view_form">
<field name="model">product.price_list.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Price List Line">
<label name="price_list"/>
<field name="price_list"/>
<newline/>
<label name="product"/>
<field name="product"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="sequence"/>
<field name="sequence"/>
<newline/>
<label name="formula"/>
<field name="formula" colspan="3"/>
</form>
]]>
</field>
<field name="name">price_list_line_form</field>
</record>
<record model="ir.ui.view" id="price_list_line_view_tree">
<field name="model">product.price_list.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Price List Lines">
<field name="price_list"/>
<field name="sequence"/>
<field name="product"/>
<field name="quantity"/>
<field name="formula"/>
</tree>
]]>
</field>
<field name="name">price_list_line_tree</field>
</record>
<record model="ir.ui.view" id="price_list_line_view_tree_sequence">
<field name="model">product.price_list.line</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Price List Lines" sequence="sequence">
<field name="product"/>
<field name="quantity"/>
<field name="formula"/>
</tree>
]]>
</field>
<field name="name">price_list_line_tree_sequence</field>
</record>
<record model="ir.model.access" id="access_price_list_line">
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_product_price_list',
],
package_data={
'trytond.modules.product_price_list': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+9
View File
@@ -0,0 +1,9 @@
<?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='accounting']" position="after">
<page string="Price List" id="price_list">
</page>
</xpath>
</data>
+11
View File
@@ -0,0 +1,11 @@
<?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. -->
<form string="Price List">
<label name="name"/>
<field name="name"/>
<label name="company"/>
<field name="company"/>
<field name="lines" colspan="4"
view_ids="product_price_list.price_list_line_view_tree_sequence"/>
</form>
+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. -->
<form string="Price List Line">
<label name="price_list"/>
<field name="price_list"/>
<newline/>
<label name="product"/>
<field name="product"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="sequence"/>
<field name="sequence"/>
<newline/>
<label name="formula"/>
<field name="formula" colspan="3"/>
</form>
+10
View File
@@ -0,0 +1,10 @@
<?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. -->
<tree string="Price List Lines">
<field name="price_list"/>
<field name="sequence"/>
<field name="product"/>
<field name="quantity"/>
<field name="formula"/>
</tree>
+8
View File
@@ -0,0 +1,8 @@
<?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. -->
<tree string="Price List Lines" sequence="sequence">
<field name="product"/>
<field name="quantity"/>
<field name="formula"/>
</tree>
+6
View File
@@ -0,0 +1,6 @@
<?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. -->
<tree string="Price Lists">
<field name="name"/>
</tree>