[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:
@@ -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:
|
||||
|
||||
@@ -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', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="base.group_extended" />
|
||||
<field name="amount"/>
|
||||
|
||||
Reference in New Issue
Block a user