Use separate XML files for views

This commit is contained in:
Cédric Krier committed 2013-03-09 15:42:09 +01:00
1 parent 5dc8fd6b83
commit 040bed9133
16 files changed
+157 -166

No files matched your search

+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/*
+3 -34
View File
@@ -7,50 +7,19 @@ this repository contains the full copyright notices and license terms. -->
<field name="model">product.category</field>
<field name="type">tree</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Product Categories">
<field name="name"/>
<field name="rec_name"/>
</tree>
]]>
</field>
<field name="name">category_list</field>
</record>
<record model="ir.ui.view" id="category_view_tree">
<field name="model">product.category</field>
<field name="type">tree</field>
<field name="priority">20</field>
<field name="field_childs">childs</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Product Categories" keyword_open="1">
<field name="name"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">category_tree</field>
</record>
<record model="ir.ui.view" id="category_view_form">
<field name="model">product.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Product Category">
<label name="name"/>
<field name="name"/>
<label name="parent"/>
<field name="parent"/>
<label name="rec_name"/>
<field name="rec_name" colspan="3"/>
<notebook colspan="4">
<page string="Children" col="1" id="childs">
<field name="childs"/>
</page>
</notebook>
</form>
]]>
</field>
<field name="name">category_form</field>
</record>
<record model="ir.action.act_window" id="act_category_tree">
+4 -81
View File
@@ -26,104 +26,27 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="template_view_tree">
<field name="model">product.template</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Product Templates">
<field name="name"/>
<field name="list_price_uom"/>
<field name="cost_price_uom"/>
<field name="type"/>
<field name="category"/>
<field name="default_uom"/>
<field name="active" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">template_tree</field>
</record>
<record model="ir.ui.view" id="template_view_form">
<field name="model">product.template</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Product Template" col="6">
<label name="name"/>
<field name="name" xexpand="1"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="6">
<page string="General" id="general">
<label name="type"/>
<field name="type"/>
<label name="consumable"/>
<field name="consumable"/>
<label name="category"/>
<field name="category" />
<label name="default_uom"/>
<field name="default_uom" />
<label name="list_price"/>
<field name="list_price"/>
<newline/>
<label name="cost_price"/>
<field name="cost_price"/>
<label name="cost_price_method"/>
<field name="cost_price_method"/>
</page>
</notebook>
</form>
]]>
</field>
<field name="name">template_form</field>
</record>
<record model="ir.ui.view" id="product_view_tree">
<field name="model">product.product</field>
<field name="type">tree</field>
<field name="inherit" ref="template_view_tree"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/tree"
position="replace_attributes">
<tree string="Products"/>
</xpath>
<xpath
expr="/tree/field[@name=&quot;name&quot;]"
position="after">
<field name="code"/>
</xpath>
</data>
]]>
</field>
<field name="name">product_tree</field>
</record>
<record model="ir.ui.view" id="product_view_form">
<field name="model">product.product</field>
<field name="type">form</field>
<field name="inherit" ref="template_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath
expr="/form"
position="replace_attributes">
<form string="Products"/>
</xpath>
<xpath
expr="/form/field[@name='name']"
position="after">
<label name="code"/>
<field name="code"/>
</xpath>
<xpath
expr="/form/notebook/page[@id=&quot;general&quot;]"
position="inside">
<separator name="description" colspan="4"/>
<field name="description" colspan="4"/>
</xpath>
</data>
]]>
</field>
<field name="name">product_form</field>
</record>
<record model="ir.action.act_window" id="act_product_form">
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_product',
],
package_data={
'trytond.modules.product': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po', 'icons/*.svg']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'icons/*.svg']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+4 -50
View File
@@ -6,45 +6,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="uom_view_tree">
<field name="model">product.uom</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Units of Measure">
<field name="name"/>
<field name="symbol"/>
<field name="category"/>
<field name="factor"/>
<field name="rate"/>
<field name="rounding"/>
<field name="active" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">uom_tree</field>
</record>
<record model="ir.ui.view" id="uom_view_form">
<field name="model">product.uom</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Unit of Measure" col="4">
<label name="name"/>
<field name="name"/>
<label name="category"/>
<field name="category"/>
<label name="symbol"/>
<field name="symbol"/>
<label name="active"/>
<field name="active"/>
<label name="factor"/>
<field name="factor"/>
<label name="rate"/>
<field name="rate"/>
<label name="rounding"/>
<field name="rounding"/>
<label name="digits"/>
<field name="digits"/>
</form>
]]>
</field>
<field name="name">uom_form</field>
</record>
<record model="ir.action.act_window" id="act_uom_form">
<field name="name">Units of Measure</field>
@@ -66,26 +33,13 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="uom_category_view_tree">
<field name="model">product.uom.category</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Categories of Unit of Measure">
<field name="name"/>
</tree>
]]>
</field>
<field name="name">uom_category_tree</field>
</record>
<record model="ir.ui.view" id="uom_category_view_form">
<field name="model">product.uom.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Category of Unit of Measure" col="6">
<label name="name"/>
<field name="name"/>
</form>
]]>
</field>
<field name="name">uom_category_form</field>
</record>
<record model="ir.action.act_window" id="act_uom_category_form">
+16
View File
@@ -0,0 +1,16 @@
<?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="Product Category">
<label name="name"/>
<field name="name"/>
<label name="parent"/>
<field name="parent"/>
<label name="rec_name"/>
<field name="rec_name" colspan="3"/>
<notebook colspan="4">
<page string="Children" col="1" id="childs">
<field name="childs"/>
</page>
</notebook>
</form>
+7
View File
@@ -0,0 +1,7 @@
<?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="Product Categories">
<field name="name"/>
<field name="rec_name"/>
</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="Product Categories" keyword_open="1">
<field name="name"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>
+16
View File
@@ -0,0 +1,16 @@
<?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" position="replace_attributes">
<form string="Products"/>
</xpath>
<xpath expr="/form/field[@name='name']" position="after">
<label name="code"/>
<field name="code"/>
</xpath>
<xpath expr="/form/notebook/page[@id='general']" position="inside">
<separator name="description" colspan="4"/>
<field name="description" colspan="4"/>
</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. -->
<data>
<xpath expr="/tree" position="replace_attributes">
<tree string="Products"/>
</xpath>
<xpath expr="/tree/field[@name='name']" position="after">
<field name="code"/>
</xpath>
</data>
+28
View File
@@ -0,0 +1,28 @@
<?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="Product Template" col="6">
<label name="name"/>
<field name="name" xexpand="1"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="6">
<page string="General" id="general">
<label name="type"/>
<field name="type"/>
<label name="consumable"/>
<field name="consumable"/>
<label name="category"/>
<field name="category" />
<label name="default_uom"/>
<field name="default_uom" />
<label name="list_price"/>
<field name="list_price"/>
<newline/>
<label name="cost_price"/>
<field name="cost_price"/>
<label name="cost_price_method"/>
<field name="cost_price_method"/>
</page>
</notebook>
</form>
+12
View File
@@ -0,0 +1,12 @@
<?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="Product Templates">
<field name="name"/>
<field name="list_price_uom"/>
<field name="cost_price_uom"/>
<field name="type"/>
<field name="category"/>
<field name="default_uom"/>
<field name="active" tree_invisible="1"/>
</tree>
+7
View File
@@ -0,0 +1,7 @@
<?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="Category of Unit of Measure" col="6">
<label name="name"/>
<field name="name"/>
</form>
+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="Categories of Unit of Measure">
<field name="name"/>
</tree>
+21
View File
@@ -0,0 +1,21 @@
<?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="Unit of Measure" col="4">
<label name="name"/>
<field name="name"/>
<label name="category"/>
<field name="category"/>
<label name="symbol"/>
<field name="symbol"/>
<label name="active"/>
<field name="active"/>
<label name="factor"/>
<field name="factor"/>
<label name="rate"/>
<field name="rate"/>
<label name="rounding"/>
<field name="rounding"/>
<label name="digits"/>
<field name="digits"/>
</form>
+12
View File
@@ -0,0 +1,12 @@
<?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="Units of Measure">
<field name="name"/>
<field name="symbol"/>
<field name="category"/>
<field name="factor"/>
<field name="rate"/>
<field name="rounding"/>
<field name="active" tree_invisible="1"/>
</tree>