[IMP] improve customer invoice view.

bzr revid: nco@tinyerp.com-20120626091310-5srg6va55n52rvxg
This commit is contained in:
Nimesh (Open ERP)
2012-06-26 14:43:10 +05:30
parent bb4240fc56
commit 5f49751069
4 changed files with 23 additions and 16 deletions
+19 -14
View File
@@ -52,20 +52,25 @@
<field name="arch" type="xml">
<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="quantity" class="oe_inline"/>
<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 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"/>
<group>
<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 name="name"/>
<label string="Quantity" for="quantity" align="1.0"/>
<div>
<field name="quantity" class="oe_inline"/>
<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="price_unit"/>
<field name="discount"/>
</group>
<group>
<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="company_id" groups="base.group_multi_company" readonly="1"/>
<field name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" widget="many2many_tags"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</group>
</group>
<separator string="Notes"/>
<field name="note"/>
@@ -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="name" position="after">
<field name="account_id" position="after">
<field name="asset_category_id"/>
</field>
</field>
@@ -160,7 +160,7 @@ class account_invoice_line(osv.osv):
('line','Separator Line'),
('break','Page Break'),]
,'Type', select=True, required=True),
'sequence': fields.integer('Sequence Number', select=True, help="Gives the sequence order when displaying a list of invoice lines."),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of invoice lines."),
'functional_field': fields.function(_fnct, arg=None, fnct_inv=None, fnct_inv_arg=None, type='char', fnct_search=None, obj=None, store=False, string="Source Account"),
}
@@ -11,6 +11,8 @@
<field name="arch" type="xml">
<field name="product_id" position="before">
<field name="state" on_change="onchange_invoice_line_view(state)" />
</field>
<field name="account_id" position="before">
<field name="sequence"/>
</field>
</field>