[FIX] account: put account group in receivale/payble account property in partner...
[odoo/odoo.git] / addons / account / partner_view.xml
index bfe4e80..e1e4342 100644 (file)
@@ -9,16 +9,25 @@
             <field name="arch" type="xml">
                 <form string="Fiscal Position">
                     <field name="name" select="1"/>
-                    <field name="company_id"/>
+                    <field name="company_id" widget="selection" groups="base.group_multi_company"/>
                     <newline/>
-                    <field name="account_tax" select="2"/>
-                    <field name="account_supplier_tax" select="2"/>
-                    <field name="account_ids" colspan="4">
-                        <tree string="Accounts Mapping" editable="bottom">
+                    <field name="note" colspan="4"/>
+                    <field name="tax_ids" colspan="4" widget="one2many_list">
+                        <tree string="Tax Mapping" editable="bottom">
+                            <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
+                            <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
+                        </tree>
+                        <form string="Tax Mapping">
+                            <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
+                            <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
+                        </form>
+                    </field>
+                    <field name="account_ids" colspan="4" widget="one2many_list">
+                        <tree string="Account Mapping" editable="bottom">
                             <field name="account_src_id"/>
                             <field name="account_dest_id"/>
                         </tree>
-                        <form string="Accounts Mapping">
+                        <form string="Account Mapping">
                             <field name="account_src_id"/>
                             <field name="account_dest_id"/>
                         </form>
@@ -33,9 +42,7 @@
             <field name="arch" type="xml">
                 <tree string="Fiscal Position">
                     <field name="name"/>
-                    <field name="company_id"/>
-                    <field name="account_tax"/>
-                    <field name="account_supplier_tax"/>
+                    <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                 </tree>
             </field>
         </record>
             <field name="inherit_id" ref="base.view_partner_form"/>
             <field name="arch" type="xml">
                 <notebook>
-                    <page string="Accounting" position="inside">
+                <page string="Accounting" position="inside">
                     <group col="2" colspan="2">
                         <separator string="Customer Accounting Properties" colspan="2"/>
-                        <field name="property_account_receivable"/>
-                        <field name="property_account_position"/>
-                        <field name="property_payment_term"/>
+                        <field name="property_account_receivable" groups="account.group_account_user" />
+                        <field name="property_account_position" widget="selection"/>
+                        <field name="property_payment_term" widget="selection"/>
                     </group>
                     <group col="2" colspan="2">
                         <separator string="Supplier Accounting Properties" colspan="2"/>
-                        <field name="property_account_payable"/>
+                        <field name="property_account_payable" groups="account.group_account_user"/>
                     </group>
                     <group col="2" colspan="2">
                         <separator string="Customer Credit" colspan="2"/>
-                        <field name="credit" select="2"/>
-                        <field name="credit_limit" select="2"/>
+                        <field name="credit"/>
+                        <field name="credit_limit" groups="base.group_extended"/>
                     </group>
                     <group col="2" colspan="2">
                         <separator string="Supplier Debit" colspan="2"/>
-                        <field name="debit" select="2"/>
+                        <field name="debit"/>
                     </group>
-                    <field colspan="4" context="address=address" name="bank_ids" nolabel="1" select="2">
+                    <field colspan="4" context="{'address': address}" name="bank_ids" nolabel="1">
                         <form string="Bank account">
-                            <field name="state" select="2"/>
+                            <field name="state"/>
                             <newline/>
                             <field name="acc_number" select="1"/>
                             <newline/>
                             <field name="bank"/>
                             <newline/>
                             <field name="sequence"/>
-                            <field colspan="4" name="name" select="2"/>
+                            <field colspan="4" name="name"/>
                             <separator colspan="4" string="Bank account owner"/>
                             <field colspan="4" name="owner_name"/>
                             <field colspan="4" name="street"/>
                         </form>
                         <tree string="Bank Details">
                             <field name="state"/>
+                            <field name="bank"/>
                             <field name="owner_name"/>
                             <field name="acc_number"/>
                         </tree>
                     </field>
+                    <field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
                 </page>
                 </notebook>
             </field>
         </record>
+        
+        <!--  Partners info tab view-->
 
+        <record id="view_account_partner_info_form" model="ir.ui.view">
+            <field name="name">res.partner.account.info.inherit</field>
+            <field name="model">res.partner</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="arch" type="xml">
+                <xpath expr="//notebook[last()]" position="after">
+                       <notebook colspan="4">
+                           <page string="Project">
+                               <field name="contract_ids" colspan="4" nolabel="1" />
+                           </page>
+                       </notebook>
+                </xpath>
+            </field>
+        </record>
+        
     </data>
 </openerp>