[FIX] Account: Bank statement => onchange on partner with st. line -> if line does not save then amount taken from context

bzr revid: mra@mra-laptop-20100907091738-b9abe0896v252zrb
This commit is contained in:
Mustufa Rangwala
2010-09-07 14:47:38 +05:30
parent 62354263a2
commit b46bbb5e65
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -644,7 +644,7 @@ class account_bank_statement_line(osv.osv):
account_id = part.property_account_receivable.id
res['value']['account_id'] = account_id
if account_id and (not line or (line and not line[0].amount)):
if account_id and (not line or (line and not line[0].amount)) and not context.get('amount', False):
company_currency_id = res_users_obj.browse(cursor, user, user,
context=context).company_id.currency_id.id
if not currency_id:
+1 -1
View File
@@ -538,7 +538,7 @@
<field name="date"/>
<field name="name"/>
<field name="type"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency)"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, {'amount': amount})"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id"/>
<field name="analytic_account_id" groups="base.group_extended" />
<field name="amount"/>