[IMP] improve the customer and supplier invoice and refunds form
authorNimesh (Open ERP) <nco@tinyerp.com>
Mon, 25 Jun 2012 09:25:40 +0000 (14:55 +0530)
committerNimesh (Open ERP) <nco@tinyerp.com>
Mon, 25 Jun 2012 09:25:40 +0000 (14:55 +0530)
bzr revid: nco@tinyerp.com-20120625092540-m7243o1kkdcg1l62

addons/account/account_invoice_view.xml
addons/account_asset/account_asset_invoice_view.xml
addons/account_invoice_layout/account_invoice_layout_view.xml

index 68a723a..7ac6e61 100644 (file)
@@ -53,6 +53,7 @@
                 <form string="Invoice Line" version="7.0">
                     <group col="4">
                         <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
+                        <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
                         <field name="name"/>
                         <label string="Quantity" for="quantity" align="1.0"/>
                         <div>
                             <field name="uos_id" class="oe_inline"
                               on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>
                         </div>
+                        <field name="company_id" groups="base.group_multi_company" readonly="1"/>
                         <field name="price_unit"/>
-                        <field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
-                        <field name="discount"/>
                         <field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
+                        <field name="discount"/>
                         <field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
-                        <field name="company_id" groups="base.group_multi_company" readonly="1"/>
                     </group>
                     <separator string="Notes"/>
                     <field name="note"/>
                     <field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
                 </header>
                 <sheet string="Supplier Invoice">
-                    <group>
-                        <group>
-                            <field string="Supplier" name="partner_id"
+                       <h1>
+                               <label string="Draft Invoice " attrs="{'invisible': [('state','not in',('draft',))]}"/>
+                               <label string="Pro Forma Invoice " attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
+                               <label string="Invoice " attrs="{'invisible': [('state','in',('draft','proforma','proforma2'))]}"/>
+                               <field name="number" readonly="1" class="oe_inline"/>
+                       </h1>
+                    <label string="Concerns" for="origin" class="oe_edit_only"/>
+                    <h2>
+                        <field name="origin" placeholder="PO 002"/>
+                        <field string="Supplier" name="partner_id"
                               on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
                               context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
                               domain="[('supplier', '=', True)]"/>
-                            <field name="fiscal_position" widget="selection"/>
+                    </h2>
+                    <group>
+                       <group>
+                               <field name="date_invoice"/>
+                               <field name="date_due"/>
+                               <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
+                               <label for="reference"/>
+                            <div>
+                                <field name="reference_type"/>
+                                <field name="reference" placeholder="Payment Reference"/>
+                            </div>
                         </group>
                         <group>
-                            <field name="number"/>
-                            <field name="date_invoice"/>
-                            <field name="period_id" domain="[('state', '=', 'draft')]"
-                                groups="account.group_account_user" widget="selection"/>
-                            <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"
-                                groups="account.group_account_user"/>
-                            <field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
-                                name="account_id" groups="account.group_account_user"/>
+                               <field name="fiscal_position" widget="selection"/>
+                               <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"
+                                       groups="account.group_account_user"/>
+                               <field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
+                                       name="account_id" groups="account.group_account_user"/>
                             <field name="currency_id"/>
-                            <field name="type" invisible="1"/>
+                           
                         </group>
                         <group>
-                            <label for="reference"/>
-                            <div>
-                                <field name="reference_type"/>
-                                <field name="reference" placeholder="Payment Reference"/>
-                            </div>
-                            <field name="date_due"/>
+                            <field name="type" invisible="1"/>
                         </group>
                     </group>
                     <notebook>
                         </page>
                         <page string="Other Info">
                             <group col="4">
-                                <field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
+                               <field name="payment_term" widget="selection"/>
+                               <field name="user_id"/>
+                               <field name="move_id" groups="account.group_account_user"/>
+                               <field name="name"/>
+                                <field name="period_id" domain="[('state', '=', 'draft')]"
+                                groups="account.group_account_user" widget="selection"/>
                                 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
-                                <newline/>
-                                <field name="payment_term" widget="selection"/>
-                                <field name="name"/>
-                                <newline/>
-                                <field name="origin" placeholder="PO0025"/>
-                                <field name="user_id"/>
-                                <field name="move_id" groups="account.group_account_user"/>
                             </group>
                         </page>
                         <page string="Payments">
                         </page>
                         <page string="Other Info">
                             <group col="4">
+                               <field name="user_id"/>
+                               <field name="origin" placeholder="SO0032"/>
                                 <field name="company_id" on_change="onchange_company_id(company_id,partner_id,type,invoice_line,currency_id)" widget="selection" groups="base.group_multi_company"/>
-                                <newline/>
                                 <field name="date_due"/>
-                                <field name="user_id"/>
-                                <newline/>
-                                <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
-                                <field name="origin" placeholder="SO0032"/>
                                 <field name="move_id" groups="account.group_account_user"/>
+                                <field domain="[('partner_id.ref_companies', 'in', [company_id])]" name="partner_bank_id"/>
                             </group>
-                            <field name="comment" placeholder="Add an additional information in the invoice..."/>
+                            <field name="comment" placeholder="Terms and Conditions..."/>
                         </page>
                         <page string="Payments">
                             <field name="payment_ids">
index fe1435d..4af0c65 100644 (file)
@@ -12,7 +12,7 @@
         <field name="inherit_id" ref="account.view_invoice_line_form"/>
         <field name="type">form</field>
         <field name="arch" type="xml">
-            <field name="account_id" position="after">
+            <field name="name" position="after">
                 <field name="asset_category_id"/>
             </field>
         </field>
index e9789b8..7cf4c0a 100644 (file)
@@ -9,7 +9,7 @@
             <field name="inherit_id" ref="account.view_invoice_line_form"/>
             <field name="type">form</field>
             <field name="arch" type="xml">
-                <field name="name" position="before">
+                <field name="product_id" position="before">
                     <field name="state" on_change="onchange_invoice_line_view(state)" />
                     <field name="sequence"/>
                 </field>