[FIX] account.bank.statement: use correct sign for secondary currency amount when validating statements with accounts having a secondary currency + removed dead code
lp bug: https://launchpad.net/bugs/669903 fixed bzr revid: odo@openerp.com-20101104152659-ugzfgdoho5pbfd77
This commit is contained in:
parent
945a1d16d8
commit
3b368f4034
|
@ -272,13 +272,10 @@ class account_bank_statement(osv.osv):
|
|||
|
||||
if st_line.account_id and st_line.account_id.currency_id and st_line.account_id.currency_id.id <> company_currency_id:
|
||||
val['currency_id'] = st_line.account_id.currency_id.id
|
||||
if company_currency_id==st_line.account_id.currency_id.id:
|
||||
amount_cur = st_line.amount
|
||||
else:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
st_line.account_id.currency_id.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = amount_cur
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
st_line.account_id.currency_id.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = -amount_cur
|
||||
|
||||
move_line_id = account_move_line_obj.create(cr, uid, val, context=context)
|
||||
torec.append(move_line_id)
|
||||
|
@ -498,4 +495,4 @@ class account_bank_statement_line(osv.osv):
|
|||
|
||||
account_bank_statement_line()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
Loading…
Reference in New Issue