[FIX] added warning message in bank statement line,raise when invoice is already canceled
lp bug: https://launchpad.net/bugs/1022677 fixed bzr revid: rmu@tinyerp.com-20120711112915-ffl9q3nn721hppjt
This commit is contained in:
parent
6cbb04758a
commit
1a2d054b84
|
@ -1047,6 +1047,8 @@ class account_voucher(osv.osv):
|
|||
# if the amount encoded in voucher is equal to the amount unreconciled, we need to compute the
|
||||
# currency rate difference
|
||||
if line.amount == line.amount_unreconciled:
|
||||
if not line.move_line_id.amount_residual:
|
||||
raise osv.except_osv(_('Wrong bank statement line'),_("You must have delete the bank statement line manualy to which the payment was reconcile. Please check the payment of the partner %s by the amount of %s !")%(line.voucher_id.partner_id.name, line.voucher_id.amount))
|
||||
currency_rate_difference = line.move_line_id.amount_residual - amount
|
||||
else:
|
||||
currency_rate_difference = 0.0
|
||||
|
|
Loading…
Reference in New Issue