[REF] account: minor change made during code review

This commit is contained in:
qdp-odoo 2014-09-17 11:18:16 +02:00
parent c8c9d4fdf6
commit 3e47eca083
1 changed files with 1 additions and 1 deletions

View File

@ -418,7 +418,7 @@ class account_bank_statement(osv.osv):
class account_bank_statement_line(osv.osv):
def create(self, cr, uid, vals, context=None):
if vals.get('amount_currency', 0) != 0 and vals.get('amount', 0) == 0:
if vals.get('amount_currency', 0) and not vals.get('amount', 0):
raise osv.except_osv(_('Error!'), _('If "Amount Currency" is specified, then "Amount" must be as well.'))
return super(account_bank_statement_line, self).create(cr, uid, vals, context=context)