[VIEW] ~date_invoice is required
authorLudovic CHEVALIER <ludovic@beurresarrasin.net>
Mon, 8 Feb 2016 14:39:55 +0000 (15:39 +0100)
committerLudovic CHEVALIER <ludovic@beurresarrasin.net>
Mon, 8 Feb 2016 14:39:55 +0000 (15:39 +0100)
__openerp__.py
view/account.xml [new file with mode: 0644]

index b5c8cd0..05770c7 100644 (file)
@@ -50,6 +50,7 @@ It installs the profile for bike co-ops to manage some features like:
         'data/products_categories.xml',
         'data/products_products.xml',
         'data/products_products_old.xml',
+        'view/account.xml',
         'view/point_of_sale.xml',
         'view/bikecoop.xml',
         'security/ir.model.access.csv',
diff --git a/view/account.xml b/view/account.xml
new file mode 100644 (file)
index 0000000..48479c7
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+    <record id="view_invoice_form" model="ir.ui.view">
+        <field name="name">account.invoice.form</field>
+        <field name="model">account.invoice</field>
+        <field name="inherit_id" ref="account.invoice_form"/>
+        <field name="arch" type="xml">
+        <xpath expr="//field[@name='date_invoice']" position="attributes">
+            <attribute name="required">1</attribute>
+        </xpath>
+        </field>
+    </record>
+    </data>
+</openerp>