[MERGE] trunk-import-openerp-thu (use strict naming convention when importing openerp...
[odoo/odoo.git] / addons / account_voucher / account_voucher_view.xml
index a290b55..1e1481c 100644 (file)
@@ -34,6 +34,8 @@
             </field>
         </record>
 
+        <!-- This general view is used in 
+             Invoicing - Journal Entries - Journal Vouchers -->
         <record model="ir.ui.view" id="view_voucher_form">
             <field name="name">account.voucher.form</field>
             <field name="model">account.voucher</field>
                     </notebook>
                   </sheet>
                   <div class="oe_chatter">
-                      <field name="message_ids" widget="mail_thread"/>
                       <field name="message_follower_ids" widget="mail_followers"/>
+                      <field name="message_ids" widget="mail_thread"/>
                   </div>
                 </form>
             </field>
             <field name="view_id" ref="view_voucher_form"/>
             <field name="act_window_id" ref="action_voucher_list"/>
         </record>
-        <menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6"/>
+        <menuitem action="action_voucher_list" id="menu_encode_entries_by_voucher" parent="account.menu_finance_entries" sequence="6" groups="base.group_no_one"/>
 
         <act_window
             id="act_journal_voucher_open"
             <field name="arch" type="xml">
                 <xpath expr="//div[@name='import_buttons']" position="inside">
                     <button name="%(action_view_account_statement_from_invoice_lines)d"
-                            string="Import Invoices" type="action" icon="gtk-execute"
+                            string="Import Invoices" type="action"
                             attrs="{'invisible':[('state','=','confirm')]}"/>
                 </xpath>
             </field>
         </record>
 
-        <record id="view_bank_statement_tree_voucher" model="ir.ui.view">
+        <record id="view_bank_statement_form_voucher" model="ir.ui.view">
             <field name="name">account.bank.statement.voucher.tree.inherit</field>
             <field name="model">account.bank.statement</field>
             <field name="inherit_id" ref="account.view_bank_statement_form"/>
             <field name="arch" type="xml">
                 <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
-                    <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
+                    <field name="voucher_id" string="" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
                 </xpath>
-            </field>
-        </record>
-
-        <record id="view_bank_statement_form_voucher" model="ir.ui.view">
-            <field name="name">account.bank.statement.voucher.form.inherit</field>
-            <field name="model">account.bank.statement</field>
-            <field name="inherit_id" ref="account.view_bank_statement_form"/>
-            <field name="arch" type="xml">
                 <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
-                    <field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
+                    <field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
                 </xpath>
+                <field name="amount" position="attributes">
+                    <attribute name="on_change">onchange_amount(amount)</attribute>
+                </field>
             </field>
         </record>
+
         <record id="view_cash_statement_tree_voucher" model="ir.ui.view">
             <field name="name">account.cash.statement.voucher.tree.inherit</field>
             <field name="model">account.bank.statement</field>
             </field>
         </record>
 
-        <!-- res.company form view -->
-        <record model="ir.ui.view" id="view_company_inherit_currency_xchange_form">
-            <field name="name">res.company.form.inherit</field>
-            <field name="inherit_id" ref="base.view_company_form"/>
-            <field name="model">res.company</field>
+        <!-- res.config form view -->
+        <record model="ir.ui.view" id="view_account_settings_currency_xchange_form">
+            <field name="name">account.config.settings.inherit</field>
+            <field name="inherit_id" ref="account.view_account_config_settings"/>
+            <field name="model">account.config.settings</field>
+            <field name="priority">20</field>
             <field name="arch" type="xml">
-                <field name="currency_id" position="after">
-                      <field name="income_currency_exchange_account_id"/>
-                      <field name="expense_currency_exchange_account_id"/>
-                </field>
+                <xpath expr="//div[@name='group_multi_currency']" position="after">
+                    <group attrs="{'invisible': [('group_multi_currency', '&lt;&gt;', True)]}" col="2">
+                        <group>
+                            <field name="income_currency_exchange_account_id"/>
+                            <field name="expense_currency_exchange_account_id"/>
+                        </group>
+                        <group>
+                        </group>
+                    </group>
+                </xpath>
             </field>
         </record>
 
             <field name="tag">reload</field>
             <field name="params" eval="{'menu_id': ref('account.menu_finance')}"/>
         </record>
-        <record id="todo_open_invoice_menu" model="ir.actions.todo">
+        <record id="base.open_menu" model="ir.actions.todo">
             <field name="action_id" ref="action_client_invoice_menu"/>
-            <field name="type">automatic</field>
-            <field name="sequence">100</field>
+            <field name="state">open</field>
         </record>
 
     </data>