[MERGE]: Merged lp:~openerp-commiter/openobject-addons/trunk-accounting-view-imp-atp-improve-Customers-Sales-Receipt-pja

bzr revid: atp@tinyerp.com-20120628035509-djun3mot3och5uvo
This commit is contained in:
Atul Patel (OpenERP)
2012-06-28 09:25:09 +05:30
2 changed files with 21 additions and 23 deletions
+2 -3
View File
@@ -261,7 +261,7 @@ class account_voucher(osv.osv):
('receipt','Receipt'),
],'Default Type', readonly=True, states={'draft':[('readonly',False)]}),
'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}),
'date':fields.date('Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'date':fields.date('Bill Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}),
@@ -404,7 +404,6 @@ class account_voucher(osv.osv):
line_amount = 0.0
line_amount = line.get('amount',0.0)
voucher_total += line_amount
total = voucher_total
total_tax = 0.0
if tax_id:
@@ -421,7 +420,7 @@ class account_voucher(osv.osv):
res.update({
'amount':total or voucher_total,
'tax_amount':total_tax
'tax_amount':total_tax
})
return {
'value':res
@@ -89,22 +89,23 @@
</header>
<sheet string="Sales Receipt" layout="auto">
<div class="oe_title">
<label for="number" class="oe_edit_only"/>
<h1><field name="number" readonly="0" /></h1>
<label for="number" class="oe_edit_only" />
<h1>
<field name="number" readonly="0" />
</h1>
</div>
<group>
<group>
<field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
<field name="date" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>
<field name="date_due" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
<field name="name" colspan="2"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<group>
<field name="currency_id"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id, date, amount, type, company_id, context)"/>
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id)" required="1"/>
<field name="name" colspan="2"/>
<field name="account_id"
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
domain="[('type','=','liquidity')]"/>
@@ -125,22 +126,20 @@
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</tree>
</field>
<group col="3">
<group colspan="1">
<field name="narration" placeholder="Internal Notes" nolabel="1" />
</group>
<button type="object"
icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax"
attrs="{'invisible': [('state','!=','draft')]}"/>
<group>
<group>
<group class="oe_subtotal_footer" string="Total">
<field name="tax_id"
on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
widget="selection"
domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
<field name="tax_amount" nolabel="1"/>
<field name="amount" class="oe_subtotal_footer_separator" />
<button type="object"
icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax"
attrs="{'invisible': [('state','!=','draft')]}"/>
</group>
<field name="narration" placeholder="Internal Notes" nolabel="1" />
</group>
<group class="oe_subtotal_footer">
<field name="tax_id" string="Tax"
on_change="onchange_price(line_cr_ids, tax_id, partner_id)"
widget="selection"
domain="[('type_tax_use','in',('sale','all')), ('parent_id', '=', False)]"/>
<field name="tax_amount"/>
<field name="amount" class="oe_subtotal_footer_separator" />
</group>
</group>
</page>