[MERGE]: Merged lp:~openerp-commiter/openobject-addons/trunk-accounting-view-imp-atp-improve-customer-payment-shp
bzr revid: atp@tinyerp.com-20120628132647-xrthtfkycrm186pa
This commit is contained in:
commit
de60ced366
|
@ -129,6 +129,7 @@ class account_voucher(osv.osv):
|
|||
journal_id = context.get('journal_id', False)
|
||||
if journal_id:
|
||||
journal = journal_pool.browse(cr, uid, journal_id, context=context)
|
||||
print "jpurnallll",journal
|
||||
if journal.currency:
|
||||
return journal.currency.id
|
||||
return False
|
||||
|
@ -1372,6 +1373,7 @@ class account_voucher_line(osv.osv):
|
|||
'amount_unreconciled': fields.function(_compute_balance, multi='dc', type='float', string='Open Balance', store=True, digits_compute=dp.get_precision('Account')),
|
||||
'company_id': fields.related('voucher_id','company_id', relation='res.company', type='many2one', string='Company', store=True, readonly=True),
|
||||
'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency', readonly=True),
|
||||
|
||||
}
|
||||
_defaults = {
|
||||
'name': '',
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
</group>
|
||||
</group>
|
||||
<field name="account_id" widget="selection" invisible="True"/>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Voucher Entry">
|
||||
<field name="line_ids" on_change="onchange_price(line_ids, tax_id, partner_id)" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}">
|
||||
|
|
|
@ -321,21 +321,19 @@
|
|||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
<label for="parter_id" />
|
||||
</div>
|
||||
<label for="parter_id" class="oe_edit_only" string="Customer"/>
|
||||
<h1>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
|
||||
</h1>
|
||||
</div>
|
||||
<div>
|
||||
Pay
|
||||
</h1>
|
||||
<h2>
|
||||
Pay
|
||||
<field name="amount"
|
||||
invisible="context.get('line_type', False)"
|
||||
string="Paid Amount"
|
||||
class="oe_inline"
|
||||
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||
by
|
||||
<field name="currency_id" class="oe_edit_only oe_inline"/>
|
||||
by
|
||||
<field name="journal_id"
|
||||
domain="[('type','in',['bank', 'cash'])]"
|
||||
invisible="context.get('line_type', False)"
|
||||
|
@ -343,20 +341,23 @@
|
|||
class="oe_inline"
|
||||
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
|
||||
string="Payment Method"/>
|
||||
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<group col="6">
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
|
||||
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="account_id"
|
||||
<group>
|
||||
<group>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="003/10"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="Invoice SAJ/0042"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="account_id"
|
||||
widget="selection"
|
||||
invisible="True"/>
|
||||
<field name="pre_line" invisible="1"/>
|
||||
<field name="type" invisible="True"/>
|
||||
<field name="pre_line" invisible="1"/>
|
||||
<field name="type" invisible="True"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Payment Information">
|
||||
|
@ -392,9 +393,9 @@
|
|||
<field name="amount" sum="Total Allocation" on_change="onchange_amount(amount, amount_unreconciled, context)" string="Allocation"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="3">
|
||||
<group col="2" string="Internal Notes">
|
||||
<field name="narration" colspan="2" nolabel="1"/>
|
||||
<group>
|
||||
<group col="2">
|
||||
<field name="narration" colspan="2" nolabel="1" placeholder="Add an internal note"/>
|
||||
</group>
|
||||
<group col="4" attrs="{'invisible':[('currency_id','=',False),('is_multi_currency','=',False)]}">
|
||||
<separator string="Currency Options" colspan="4"/>
|
||||
|
@ -446,6 +447,7 @@
|
|||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
</footer>
|
||||
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
Loading…
Reference in New Issue