ACCOUNT: Better exceptions in reconcile() in class account_move_line
bzr revid: pinky-3b920ed218e4d69de8cf74f1426c95aab7bb3e7f
This commit is contained in:
parent
d0e14d7b30
commit
d99f39edaa
|
@ -1110,9 +1110,9 @@ class account_move_line(osv.osv):
|
|||
r = cr.fetchall()
|
||||
#TODO: move this check to a constraint in the account_move_reconcile object
|
||||
if len(r) != 1:
|
||||
raise 'Entries are not of the same account !'
|
||||
raise Exception('Entries are not of the same account !')
|
||||
if r[0][1] != None:
|
||||
raise 'Some entries are already reconciled !'
|
||||
raise Exception('Some entries are already reconciled !')
|
||||
if writeoff != 0:
|
||||
if not writeoff_acc_id:
|
||||
raise osv.except_osv('Warning', 'You have to provide an account for the write off entry !')
|
||||
|
|
Loading…
Reference in New Issue