[VIEW] +analytic account is required in sale order
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 8 Apr 2016 07:59:25 +0000 (09:59 +0200)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 8 Apr 2016 07:59:25 +0000 (09:59 +0200)
__openerp__.py
view/sale.xml [new file with mode: 0644]

index 28f0e31..ac4c029 100644 (file)
@@ -50,6 +50,7 @@ It installs the profile for bike co-ops to manage some features like:
     'update_xml': [
         'view/account_invoice_view.xml',
         'view/hr_expense.xml',
+        'view/sale.xml',
     ],
     'installable': True,
     'auto_install': False,
diff --git a/view/sale.xml b/view/sale.xml
new file mode 100644 (file)
index 0000000..3b02f06
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_order_form" model="ir.ui.view">
+            <field name="name">sale.order.form</field>
+            <field name="model">sale.order</field>
+            <field name="inherit_id" ref="sale.view_order_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//field[@name='project_id']" position="attributes">
+                    <attribute name="required">1</attribute>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>