[FIX] dead error management code

This commit is contained in:
unknown
2013-04-25 09:16:40 +02:00
parent e0cfdc7820
commit 03a8016fd7

View File

@@ -406,21 +406,13 @@ class AccountStatementLine(orm.Model):
""" """
profile_obj = self.pool.get('account.statement.profile') profile_obj = self.pool.get('account.statement.profile')
res = {} res = {}
errors_stack = []
if line.get('already_completed'): if line.get('already_completed'):
return res return res
try: # Ask the rule
# Ask the rule vals = profile_obj._find_values_from_rules(cr, uid, rules, line, context)
vals = profile_obj._find_values_from_rules(cr, uid, rules, line, context) if vals:
if vals: vals['id'] = line['id']
vals['id'] = line['id'] return vals
return vals
except ErrorTooManyPartner as exc:
msg = "Line ID %s had following error: %s" % (line['id'], exc.value)
errors_stack.append(msg)
if errors_stack:
msg = u"\n".join(errors_stack)
raise ErrorTooManyPartner(msg)
return res return res