[VIEW] +import invoice button in cash statetement 7.0
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 7 Jul 2017 10:13:48 +0000 (12:13 +0200)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Fri, 7 Jul 2017 10:13:48 +0000 (12:13 +0200)
__openerp__.py
view/account.xml [new file with mode: 0644]

index 5628d86..5bd4b5e 100644 (file)
@@ -53,6 +53,7 @@ It installs the profile for bike co-ops to manage some features like:
         'data/remembership.xml',
         'data/sale.xml',
         'data/stock.xml',
         'data/remembership.xml',
         'data/sale.xml',
         'data/stock.xml',
+        'view/account.xml',
         'view/bikecoop.xml',
         'view/point_of_sale.xml',
     ],
         'view/bikecoop.xml',
         'view/point_of_sale.xml',
     ],
diff --git a/view/account.xml b/view/account.xml
new file mode 100644 (file)
index 0000000..b480359
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <record id="view_bank_statement_form2_invoice" model="ir.ui.view">
+            <field name="name">account.bank.statement.form2.inherit</field>
+            <field name="model">account.bank.statement</field>
+            <field name="inherit_id" ref="account.view_bank_statement_form2"/>
+            <field name="arch" type="xml">
+                <xpath expr="//label[@for='name']" position="before">
+                    <div class="oe_right oe_button_box" name="import_buttons">
+                    <button name="%(account_voucher.action_view_account_statement_from_invoice_lines)d"
+                                string="Import Invoices" type="action"
+                                attrs="{'invisible':[('state','=','confirm')]}"/>
+                    </div>
+                </xpath>
+            </field>
+        </record>
+    </data>
+</openerp>