[VIEW] +description for normal analytic account
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 17 Dec 2018 14:21:28 +0000 (15:21 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Mon, 17 Dec 2018 14:22:51 +0000 (15:22 +0100)
__openerp__.py
view/analytic.xml [new file with mode: 0644]

index 3982ab5..65353a7 100644 (file)
@@ -36,7 +36,8 @@ It installs the profile for bike co-ops to manage some features like:
     * Analytic account is mandatory, and is filter (normal, with code and open only) in:
         * expense form view;
         * account invoice form view.
-    * ...
+    * Description is available on normal analytic account;
+    * …
     """,
     'website': 'http://www.heureux-cyclage.org',
     'images': [],
@@ -49,6 +50,7 @@ It installs the profile for bike co-ops to manage some features like:
     ],
     'update_xml': [
         'view/account.xml',
+        'view/analytic.xml',
         'view/hr_expense.xml',
         'view/purchase.xml',
         'view/sale.xml',
diff --git a/view/analytic.xml b/view/analytic.xml
new file mode 100644 (file)
index 0000000..afe40d9
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_account_analytic_account_form" model="ir.ui.view">
+            <field name="name">account.analytic.account.form</field>
+            <field name="model">account.analytic.account</field>
+            <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
+            <field name="arch" type="xml">
+            <xpath expr="//notebook" position="inside">
+                <page string="Description" attrs="{'invisible':[('type','in',['contract', 'template'])]}">
+                    <field name="description"/>
+                </page>
+            </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>