Commits

Raimon Esteve (Zikzakmedia) committed 1ee7edf

Use separate XML files for views

Comments (0)

Files changed (10)

 include LICENSE
 include tryton.cfg
 include *.xml
+include view/*.xml
 include locale/*.po
 include doc/*
 include icons/*

configuration.xml

         <record model="ir.ui.view" id="contract_configuration_view_form">
             <field name="model">contract.configuration</field>
             <field name="type">form</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <form string="Contract Configuration">
-                    <label name="contract_sequence"/>
-                    <field name="contract_sequence"/>
-                </form>
-                ]]>
-            </field>
+            <field name="name">configuration_form</field>
         </record>
         <record model="ir.action.act_window" id="act_contract_configuration_form">
             <field name="name">Contract Configuration</field>
         <record model="ir.ui.view" id="contract_service_view_tree">
             <field name="model">contract.service</field>
             <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <tree string="Contract Service">
-                    <field name="name"/>
-                    <field name="interval_number"/>
-                    <field name="interval_type"/>
-                </tree>
-                ]]> 
-            </field>
+            <field name="name">service_tree</field>
         </record>
 
         <record model="ir.ui.view" id="contract_service_view_form">
             <field name="model">contract.service</field>
             <field name="type">form</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <form string="Contract Service" col="4">
-                    <label name="name"/>
-                    <field name="name"/>
-                    <notebook colspan="4">
-                        <page string="General" id="general">
-                            <label name="interval_number"/>
-                            <field name="interval_number"/>
-                            <label name="interval_type"/>
-                            <field name="interval_type"/>
-                            <separator string="Products" colspan="4" id="product"/>
-                            <field name="products" colspan="4"/>
-                        </page>
-                        <page string="Notes" id="notes">
-                            <field name="note"/>
-                        </page>
-                    </notebook>
-                </form>
-                ]]> 
-            </field>
+            <field name="name">service_form</field>
         </record>
 
         <record model="ir.action.act_window" id="act_contract_service">
         <record model="ir.ui.view" id="contract_service_product_view_tree">
             <field name="model">contract.service.product</field>
             <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <tree string="Contract Service Product">
-                    <field name="quantity"/>
-                    <field name="product"/>
-                </tree>
-                ]]> 
-            </field>
+            <field name="name">service_product_tree</field>
         </record>
 
         <record model="ir.ui.view" id="contract_service_product_view_form">
             <field name="model">contract.service.product</field>
             <field name="type">form</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <form string="Contract Service Product" col="6">
-                    <label name="quantity"/>
-                    <field name="quantity"/>
-                    <label name="product"/>
-                    <field name="product"/>
-                </form>
-                ]]> 
-            </field>
+            <field name="name">service_product_form</field>
         </record>
 
         <record model="ir.model.access" id="access_contract_service_product">
         <record model="ir.ui.view" id="contract_contract_view_tree">
             <field name="model">contract.contract</field>
             <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <tree string="Contracts">
-                    <field name="reference"/>
-                    <field name="party"/>
-                    <field name="service"/>
-                    <field name="start_date"/>
-                    <field name="end_date"/>
-                    <field name="company"/>
-                    <field name="state"/>
-                </tree>
-                ]]> 
-            </field>
+            <field name="name">contract_tree</field>
         </record>
 
         <record model="ir.ui.view" id="contract_contract_view_form">
             <field name="model">contract.contract</field>
             <field name="type">form</field>
-            <field name="arch" type="xml">
-                <![CDATA[
-                <form string="Contract" col="6">
-                    <label name="service"/>
-                    <field name="service" widget="selection"/>
-                    <label name="party"/>
-                    <field name="party"/>
-                    <label name="reference"/>
-                    <field name="reference"/>
-                    <notebook colspan="6">
-                        <page string="General" id="general">
-                            <label name="start_date"/>
-                            <field name="start_date"/>
-                            <label name="end_date"/>
-                            <field name="end_date"/>
-                            <group col="4" colspan="4" id="contract_buttons">
-                                <label name="state" xalign="1.0" xexpand="1"/>
-                                <field name="state" xalign="1.0" xexpand="0"/>
-                                <group col="7" colspan="2" id="buttons">
-                                    <button name="cancel" string="Cancel" icon="tryton-cancel"/>
-                                    <button name="draft" string="Draft"/>
-                                    <button name="hold" string="Hold" icon="tryton-go-previous"/>
-                                    <button name="active" string="Active" icon="tryton-go-next"/>
-                                </group>
-                            </group>
-                        </page>
-                        <page string="Other Info" id="other">
-                            <label name="company"/>
-                            <field name="company"/>
-                        </page>
-                        <page string="Notes" id="notes">
-                            <field name="note"/>
-                        </page>
-                    </notebook>
-                </form>
-                ]]> 
-            </field>
+            <field name="name">contract_form</field>
         </record>
 
         <record model="ir.action.act_window" id="act_contract_contract">
             <field name="name">Contract</field>
             <field name="code">contract.contract</field>
         </record>
-
     </data>
 </tryton>

view/configuration_form.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<form string="Contract Configuration">
+    <label name="contract_sequence"/>
+    <field name="contract_sequence"/>
+</form>

view/contract_form.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<form string="Contract" col="6">
+    <label name="service"/>
+    <field name="service" widget="selection"/>
+    <label name="party"/>
+    <field name="party"/>
+    <label name="reference"/>
+    <field name="reference"/>
+    <notebook colspan="6">
+        <page string="General" id="general">
+            <label name="start_date"/>
+            <field name="start_date"/>
+            <label name="end_date"/>
+            <field name="end_date"/>
+            <group col="4" colspan="4" id="contract_buttons">
+                <label name="state" xalign="1.0" xexpand="1"/>
+                <field name="state" xalign="1.0" xexpand="0"/>
+                <group col="7" colspan="2" id="buttons">
+                    <button name="cancel" string="Cancel" icon="tryton-cancel"/>
+                    <button name="draft" string="Draft"/>
+                    <button name="hold" string="Hold" icon="tryton-go-previous"/>
+                    <button name="active" string="Active" icon="tryton-go-next"/>
+                </group>
+            </group>
+        </page>
+        <page string="Other Info" id="other">
+            <label name="company"/>
+            <field name="company"/>
+        </page>
+        <page string="Notes" id="notes">
+            <field name="note"/>
+        </page>
+    </notebook>
+</form>

view/contract_tree.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<tree string="Contracts">
+    <field name="reference"/>
+    <field name="party"/>
+    <field name="service"/>
+    <field name="start_date"/>
+    <field name="end_date"/>
+    <field name="company"/>
+    <field name="state"/>
+</tree>

view/service_form.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<form string="Contract Service" col="4">
+    <label name="name"/>
+    <field name="name"/>
+    <notebook colspan="4">
+        <page string="General" id="general">
+            <label name="interval_number"/>
+            <field name="interval_number"/>
+            <label name="interval_type"/>
+            <field name="interval_type"/>
+            <separator string="Products" colspan="4" id="product"/>
+            <field name="products" colspan="4"/>
+        </page>
+        <page string="Notes" id="notes">
+            <field name="note"/>
+        </page>
+    </notebook>
+</form>

view/service_product_form.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<form string="Contract Service Product" col="6">
+    <label name="quantity"/>
+    <field name="quantity"/>
+    <label name="product"/>
+    <field name="product"/>
+</form>

view/service_product_tree.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<tree string="Contract Service Product">
+    <field name="quantity"/>
+    <field name="product"/>
+</tree>

view/service_tree.xml

+<?xml version="1.0"?>
+<!-- This file is part of contract module for Tryton.
+The COPYRIGHT file at the top level of this repository contains the full
+copyright notices and license terms. -->
+<tree string="Contract Service">
+    <field name="name"/>
+    <field name="interval_number"/>
+    <field name="interval_type"/>
+</tree>