Use separate XML files for views

This commit is contained in:
Cédric Krier committed 2013-03-03 17:21:40 +01:00
1 parent 5d3a3dc18c
commit d829a11c82
12 files changed
+147 -146

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
+5 -85
View File
@@ -9,78 +9,18 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="account_view_form">
<field name="model">analytic_account.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Analytic Account" col="6">
<label name="name"/>
<field name="name"/>
<label name="code"/>
<field name="code"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="6">
<page string="General Information" id="general">
<label name="type"/>
<field name="type"/>
<label name="display_balance"/>
<field name="display_balance"/>
<label name="root"/>
<field name="root"/>
<label name="parent"/>
<field name="parent"/>
<label name="company"/>
<field name="company"/>
<label name="currency"/>
<field name="currency"/>
<label name="mandatory"/>
<field name="mandatory"/>
</page>
<page string="Notes" id="notes">
<field name="note"/>
</page>
</notebook>
<group colspan="6" col="2" id="state">
<label name="state"/>
<field name="state"/>
</group>
</form>
]]>
</field>
<field name="name">account_form</field>
</record>
<record model="ir.ui.view" id="account_view_tree">
<field name="model">analytic_account.account</field>
<field name="type">tree</field>
<field name="field_childs">childs</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Analytic Accounts">
<field name="rec_name"/>
<field name="company"/>
<field name="type"/>
<field name="active" tree_invisible="1"/>
<field name="name" tree_invisible="1"/>
<field name="code" tree_invisible="1"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">account_tree</field>
</record>
<record model="ir.ui.view" id="account_view_list">
<field name="model">analytic_account.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Analytic Accounts">
<field name="rec_name"/>
<field name="company"/>
<field name="type"/>
<field name="active" tree_invisible="1"/>
<field name="name" tree_invisible="1"/>
<field name="code" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">account_list</field>
</record>
<record model="ir.action.act_window" id="act_account_tree">
@@ -124,18 +64,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="type">tree</field>
<field name="field_childs">childs</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<![CDATA[
<tree string="Analytic Accounts" keyword_open="1">
<field name="name"/>
<field name="code"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="currency"/>
</tree>
]]>
</field>
<field name="name">account_tree2</field>
</record>
<record model="ir.action.act_window" id="act_account_tree2">
<field name="name">Analytic Accounts</field>
@@ -187,16 +116,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="open_chart_start_view_form">
<field name="model">analytic_account.open_chart.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Open Chart of Analytic Accounts">
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
</form>
]]>
</field>
<field name="name">open_chart_start_form</field>
</record>
</data>
</tryton>
+3 -60
View File
@@ -6,58 +6,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="line_view_form">
<field name="model">analytic_account.line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Analytic Line">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="4">
<page string="General Information" id="general">
<label name="account"/>
<field name="account"/>
<label name="date"/>
<field name="date"/>
<label name="reference"/>
<field name="reference"/>
<label name="party"/>
<field name="party"/>
<label name="journal"/>
<field name="journal"/>
<label name="move_line"/>
<field name="move_line"/>
<label name="debit"/>
<field name="debit"/>
<label name="credit"/>
<field name="credit"/>
<label name="currency"/>
<field name="currency"/>
</page>
</notebook>
</form>
]]>
</field>
<field name="name">line_form</field>
</record>
<record model="ir.ui.view" id="line_view_tree">
<field name="model">analytic_account.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Analytic Lines" editable="top">
<field name="move_line"/>
<field name="journal"/>
<field name="name"/>
<field name="reference"/>
<field name="date"/>
<field name="party"/>
<field name="account"/>
<field name="debit"/>
<field name="credit"/>
<field name="currency"/>
</tree>
]]>
</field>
<field name="name">line_tree</field>
</record>
<record model="ir.action.act_window" id="act_line_form">
<field name="name">Analytic Lines</field>
@@ -104,18 +58,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="move_line_view_form">
<field name="model">account.move.line</field>
<field name="inherit" ref="account.move_line_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath expr="/form/notebook/page[@name='tax_lines']"
position="after">
<page string="Analytic" col="1" id="analytic">
<field name="analytic_lines"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">move_line_form</field>
</record>
</data>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_analytic_account',
],
package_data={
'trytond.modules.analytic_account': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+36
View File
@@ -0,0 +1,36 @@
<?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="Analytic Account" col="6">
<label name="name"/>
<field name="name"/>
<label name="code"/>
<field name="code"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="6">
<page string="General Information" id="general">
<label name="type"/>
<field name="type"/>
<label name="display_balance"/>
<field name="display_balance"/>
<label name="root"/>
<field name="root"/>
<label name="parent"/>
<field name="parent"/>
<label name="company"/>
<field name="company"/>
<label name="currency"/>
<field name="currency"/>
<label name="mandatory"/>
<field name="mandatory"/>
</page>
<page string="Notes" id="notes">
<field name="note"/>
</page>
</notebook>
<group colspan="6" col="2" id="state">
<label name="state"/>
<field name="state"/>
</group>
</form>
+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. -->
<tree string="Analytic Accounts">
<field name="rec_name"/>
<field name="company"/>
<field name="type"/>
<field name="active" tree_invisible="1"/>
<field name="name" tree_invisible="1"/>
<field name="code" tree_invisible="1"/>
</tree>
+13
View File
@@ -0,0 +1,13 @@
<?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="Analytic Accounts">
<field name="rec_name"/>
<field name="company"/>
<field name="type"/>
<field name="active" tree_invisible="1"/>
<field name="name" tree_invisible="1"/>
<field name="code" tree_invisible="1"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>
+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. -->
<tree string="Analytic Accounts" keyword_open="1">
<field name="name"/>
<field name="code"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="currency"/>
</tree>
+31
View File
@@ -0,0 +1,31 @@
<?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="Analytic Line">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active" xexpand="0" width="100"/>
<notebook colspan="4">
<page string="General Information" id="general">
<label name="account"/>
<field name="account"/>
<label name="date"/>
<field name="date"/>
<label name="reference"/>
<field name="reference"/>
<label name="party"/>
<field name="party"/>
<label name="journal"/>
<field name="journal"/>
<label name="move_line"/>
<field name="move_line"/>
<label name="debit"/>
<field name="debit"/>
<label name="credit"/>
<field name="credit"/>
<label name="currency"/>
<field name="currency"/>
</page>
</notebook>
</form>
+15
View File
@@ -0,0 +1,15 @@
<?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="Analytic Lines" editable="top">
<field name="move_line"/>
<field name="journal"/>
<field name="name"/>
<field name="reference"/>
<field name="date"/>
<field name="party"/>
<field name="account"/>
<field name="debit"/>
<field name="credit"/>
<field name="currency"/>
</tree>
+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="/form/notebook/page[@name='tax_lines']"
position="after">
<page string="Analytic" col="1" id="analytic">
<field name="analytic_lines"/>
</page>
</xpath>
</data>
+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. -->
<form string="Open Chart of Analytic Accounts">
<label name="start_date"/>
<field name="start_date"/>
<label name="end_date"/>
<field name="end_date"/>
</form>