Skip to content
Snippets Groups Projects
Commit 3e47eca0 authored by Quentin De Paoli's avatar Quentin De Paoli
Browse files

[REF] account: minor change made during code review

parent c8c9d4fd
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment