[FIX] account: several fixes on the new bank statement reconciliation widget
[odoo/odoo.git] / addons / account / account_view.xml
index 22b4cec..a14934a 100644 (file)
         <record id="action_bank_reconcile_bank_statements" model="ir.actions.client">
             <field name="name">Reconciliation on Bank Statements</field>
             <field name="tag">bank_statement_reconciliation_view</field>
-            <field name="context">{'statement_id': active_id}</field>
+            <field name="context">{'statement_ids': [active_id]}</field>
         </record>
         
         <record id="view_account_bank_statement_filter" model="ir.ui.view">
                     <h1><field name="name"/></h1>
                     <group>
                         <group>
-                            <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" widget="selection"/>
+                            <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
                             <label for="date" string="Date / Period"/>
                             <div>
                                 <field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/>
                 occurring over a given period of time on a bank account. You
                 should receive this periodicaly from your bank.
               </p><p>
-                OpenERP allows you to reconcile a statement line directly with
+                Odoo allows you to reconcile a statement line directly with
                 the related sale or puchase invoices.
               </p>
             </field>
                         </div>
                         <group>
                             <group>
-                                <field name="account_id"/>
+                                <field name="account_id" domain="[('type', 'not in', ['view', 'closed', 'consolidation'])]"/>
                                 <field name="amount_type"/>
-                                <field name="tax_id"/>
+                                <field name="tax_id" domain="[('type_tax_use', 'in', ['purchase', 'all']), ('parent_id', '=', False)]"/>
                             </group>
                             <group>
                                 <field name="label"/>
                 Click to define a new tax code.
               </p><p>
                 Depending on the country, a tax code is usually a cell to fill
-                in your legal tax statement. OpenERP allows you to define the
+                in your legal tax statement. Odoo allows you to define the
                 tax structure and each tax computation will be registered in
                 one or several tax code.
               </p>
                 Select the period and the journal you want to fill.
               </p><p>
                 This view can be used by accountants in order to quickly record
-                entries in OpenERP. If you want to record a supplier invoice,
-                start by recording the line of the expense account. OpenERP
+                entries in Odoo. If you want to record a supplier invoice,
+                start by recording the line of the expense account. Odoo
                 will propose to you automatically the Tax related to this
                 account and the counterpart "Account Payable".
               </p>
                 A journal entry consists of several journal items, each of
                 which is either a debit or a credit transaction.
               </p><p>
-                OpenERP automatically creates one journal entry per accounting
+                Odoo automatically creates one journal entry per accounting
                 document: invoice, refund, supplier payment, bank statements,
                 etc. So, you should record journal entries manually only/mainly
                 for miscellaneous operations.