Use separate XML files for views

This commit is contained in:
Cédric Krier
2013-03-10 20:57:00 +01:00
parent 166b583ade
commit 4628ad8731
25 changed files with 246 additions and 247 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/*
+9 -106
View File
@@ -6,35 +6,13 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="bom_view_list">
<field name="model">production.bom</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="BOMs">
<field name="name"/>
<field name="active"/>
</tree>
]]>
</field>
<field name="name">bom_list</field>
</record>
<record model="ir.ui.view" id="bom_view_form">
<field name="model">production.bom</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="BOM">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active"/>
<notebook>
<page string="Lines" id="lines" col="2">
<field name="inputs"/>
<field name="outputs"/>
</page>
</notebook>
</form>
]]>
</field>
<field name="name">bom_form</field>
</record>
<record model="ir.action.act_window" id="act_bom_list">
@@ -78,36 +56,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="bom_input_view_list">
<field name="model">production.bom.input</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="BOM Inputs">
<field name="bom"/>
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
</tree>
]]>
</field>
<field name="name">bom_input_list</field>
</record>
<record model="ir.ui.view" id="bom_input_view_form">
<field name="model">production.bom.input</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="BOM Inputs">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="product"/>
<field name="product"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</form>
]]>
</field>
<field name="name">bom_input_form</field>
</record>
<record model="ir.model.access" id="access_bom_input">
@@ -129,36 +83,12 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="bom_output_view_list">
<field name="model">production.bom.output</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="BOM Outputs">
<field name="bom"/>
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
</tree>
]]>
</field>
<field name="name">bom_output_list</field>
</record>
<record model="ir.ui.view" id="bom_output_view_form">
<field name="model">production.bom.output</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="BOM Outputs">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="product"/>
<field name="product"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</form>
]]>
</field>
<field name="name">bom_output_form</field>
</record>
<record model="ir.model.access" id="access_bom_output">
@@ -181,46 +111,19 @@ this repository contains the full copyright notices and license terms. -->
<field name="model">production.bom.tree</field>
<field name="type">tree</field>
<field name="field_childs">childs</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="BOM Tree">
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
<field name="childs" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">bom_tree_tree</field>
</record>
<record model="ir.ui.view" id="bom_tree_open_start_view_form">
<field name="model">production.bom.tree.open.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="BOM Tree">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</form>
]]>
</field>
<field name="name">bom_tree_open_start_form</field>
</record>
<record model="ir.ui.view" id="bom_tree_open_tree_view_form">
<field name="model">production.bom.tree.open.tree</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="BOM Tree">
<field name="bom_tree"/>
</form>
]]>
</field>
<field name="name">bom_tree_open_tree_form</field>
</record>
<record model="ir.action.wizard" id="wizard_bom_tree_open">
+1 -8
View File
@@ -7,14 +7,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="production_configuration_view_form">
<field name="model">production.configuration</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Production Configuration">
<label name="production_sequence"/>
<field name="production_sequence"/>
</form>
]]>
</field>
<field name="name">configuration_form</field>
</record>
<record model="ir.action.act_window"
+4 -41
View File
@@ -6,62 +6,25 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="product-bom_view_list">
<field name="model">product.product-production.bom</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Product - BOMs">
<field name="product"/>
<field name="bom"/>
</tree>
]]>
</field>
<field name="name">product_bom_list</field>
</record>
<record model="ir.ui.view" id="product-bom_view_list_sequence">
<field name="model">product.product-production.bom</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Product - BOMs" sequence="sequence">
<field name="bom"/>
<field name="sequence" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">product_bom_list_sequence</field>
</record>
<record model="ir.ui.view" id="product-bom_view_form">
<field name="model">product.product-production.bom</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Product - BOM" col="6">
<label name="product"/>
<field name="product"/>
<label name="bom"/>
<field name="bom" widget="selection"/>
<label name="sequence"/>
<field name="sequence"/>
</form>
]]>
</field>
<field name="name">product_bom_form</field>
</record>
<record model="ir.ui.view" id="product_view_form">
<field name="model">product.product</field>
<field name="inherit" ref="product.product_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath expr="/form/notebook/page[@id=&quot;general&quot;]"
position="after">
<page name="boms">
<field name="boms" colspan="4"
view_ids="production.product-bom_view_list_sequence"/>
</page>
</xpath>
</data>
]]>
</field>
<field name="name">product_form</field>
</record>
</data>
</tryton>
+3 -79
View File
@@ -56,79 +56,13 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="production_view_list">
<field name="model">production</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
<tree string="Productions">
<field name="product"/>
<field name="code"/>
<field name="reference"/>
<field name="planned_date"/>
<field name="effective_date"/>
<field name="state"/>
<field name="create_date" tree_invisible="1"/>
</tree>
]]>
</field>
<field name="name">production_list</field>
</record>
<record model="ir.ui.view" id="production_view_form">
<field name="model">production</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Production">
<label name="reference"/>
<field name="reference"/>
<label name="code"/>
<field name="code"/>
<label name="planned_date"/>
<field name="planned_date"/>
<label name="effective_date"/>
<field name="effective_date"/>
<label name="product"/>
<field name="product"/>
<label name="bom"/>
<field name="bom"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
<notebook>
<page string="Lines" id="lines">
<field name="inputs" colspan="2"/>
<field name="outputs" colspan="2"/>
</page>
<page string="Other Info" id="other">
<label name="company"/>
<field name="company"/>
<newline/>
<label name="warehouse"/>
<field name="warehouse"/>
<label name="location"/>
<field name="location"/>
<label name="cost"/>
<field name="cost"/>
</page>
</notebook>
<group col="4" colspan="4" id="state_buttons">
<label name="state"/>
<field name="state"/>
<group col="6" colspan="2" id="buttons">
<button name="cancel" string="Cancel"
icon="tryton-cancel"/>
<button name="draft" string="Draft"/>
<button name="wait" string="Wait"/>
<button name="assign_wizard" string="Assign"
icon="tryton-go-next"/>
<button name="run" string="Run"
icon="tryton-go-next"/>
<button name="done" string="Done"
icon="tryton-go-next"/>
</group>
</group>
</form>
]]>
</field>
<field name="name">production_form</field>
</record>
<record model="ir.action.act_window" id="act_production_list">
@@ -318,17 +252,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="assign_failed_view_form">
<field name="model">production.assign.failed</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
<form string="Unable to Assign" col="2">
<image name="tryton-dialog-warning" xexpand="0" xfill="0"/>
<separator string="Unable to assign those products:"
id="unable"/>
<field name="moves" colspan="2"
view_ids="stock.move_view_tree_simple"/>
</form>
]]>
</field>
<field name="name">assign_failed_form</field>
</record>
</data>
+1 -1
View File
@@ -45,7 +45,7 @@ setup(name='trytond_production',
],
package_data={
'trytond.modules.production': (info.get('xml', [])
+ ['tryton.cfg', 'locale/*.po', 'tests/*.rst']),
+ ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
+1 -12
View File
@@ -7,18 +7,7 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="location_view_form">
<field name="model">stock.location</field>
<field name="inherit" ref="stock.location_view_form"/>
<field name="arch" type="xml">
<![CDATA[
<data>
<xpath expr="/form/field[@name='storage_location']"
position="after">
<newline/>
<label name="production_location"/>
<field name="production_location"/>
</xpath>
</data>
]]>
</field>
<field name="name">location_form</field>
</record>
<record model="ir.model.access" id="access_move_group_production">
+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. -->
<form string="Unable to Assign" col="2">
<image name="tryton-dialog-warning" xexpand="0" xfill="0"/>
<separator string="Unable to assign those products:"
id="unable"/>
<field name="moves" colspan="2"
view_ids="stock.move_view_tree_simple"/>
</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. -->
<form string="BOM">
<label name="name"/>
<field name="name"/>
<label name="active"/>
<field name="active"/>
<notebook>
<page string="Lines" id="lines" col="2">
<field name="inputs"/>
<field name="outputs"/>
</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. -->
<form string="BOM Inputs">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="product"/>
<field name="product"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</form>
+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. -->
<tree string="BOM Inputs">
<field name="bom"/>
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
</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. -->
<tree string="BOMs">
<field name="name"/>
<field name="active"/>
</tree>
+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. -->
<form string="BOM Outputs">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="product"/>
<field name="product"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</form>
+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. -->
<tree string="BOM Outputs">
<field name="bom"/>
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
</tree>
+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. -->
<form string="BOM Tree">
<label name="bom"/>
<field name="bom"/>
<newline/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
</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. -->
<form string="BOM Tree">
<field name="bom_tree"/>
</form>
+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. -->
<tree string="BOM Tree">
<field name="product"/>
<field name="quantity"/>
<field name="uom"/>
<field name="childs" 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="Production Configuration">
<label name="production_sequence"/>
<field name="production_sequence"/>
</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. -->
<data>
<xpath expr="/form/field[@name='storage_location']" position="after">
<newline/>
<label name="production_location"/>
<field name="production_location"/>
</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="Product - BOM" col="6">
<label name="product"/>
<field name="product"/>
<label name="bom"/>
<field name="bom" widget="selection"/>
<label name="sequence"/>
<field name="sequence"/>
</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 - BOMs">
<field name="product"/>
<field name="bom"/>
</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. -->
<tree string="Product - BOMs" sequence="sequence">
<field name="bom"/>
<field name="sequence" 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. -->
<data>
<xpath expr="/form/notebook/page[@id='general']" position="after">
<page name="boms">
<field name="boms" colspan="4"
view_ids="production.product-bom_view_list_sequence"/>
</page>
</xpath>
</data>
+54
View File
@@ -0,0 +1,54 @@
<?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="Production">
<label name="reference"/>
<field name="reference"/>
<label name="code"/>
<field name="code"/>
<label name="planned_date"/>
<field name="planned_date"/>
<label name="effective_date"/>
<field name="effective_date"/>
<label name="product"/>
<field name="product"/>
<label name="bom"/>
<field name="bom"/>
<label name="quantity"/>
<field name="quantity"/>
<label name="uom"/>
<field name="uom"/>
<notebook>
<page string="Lines" id="lines">
<field name="inputs" colspan="2"/>
<field name="outputs" colspan="2"/>
</page>
<page string="Other Info" id="other">
<label name="company"/>
<field name="company"/>
<newline/>
<label name="warehouse"/>
<field name="warehouse"/>
<label name="location"/>
<field name="location"/>
<label name="cost"/>
<field name="cost"/>
</page>
</notebook>
<group col="4" colspan="4" id="state_buttons">
<label name="state"/>
<field name="state"/>
<group col="6" colspan="2" id="buttons">
<button name="cancel" string="Cancel"
icon="tryton-cancel"/>
<button name="draft" string="Draft"/>
<button name="wait" string="Wait"/>
<button name="assign_wizard" string="Assign"
icon="tryton-go-next"/>
<button name="run" string="Run"
icon="tryton-go-next"/>
<button name="done" string="Done"
icon="tryton-go-next"/>
</group>
</group>
</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="Productions">
<field name="product"/>
<field name="code"/>
<field name="reference"/>
<field name="planned_date"/>
<field name="effective_date"/>
<field name="state"/>
<field name="create_date" tree_invisible="1"/>
</tree>