Commits

Udo Spallek  committed b811f87

Fix if clause is not a tuple in search_move_field

clause can be a list if it comes from json

  • Participants
  • Parent commits 03764b7

Comments (0)

Files changed (1)

 
     def search_rec_name(self, name, clause):
         ids = self.search([
-            ('name',) + clause[1:],
+            ('name',) + tuple(clause[1:]),
             ], limit=1)
         if ids:
-            return [('name',) + clause[1:]]
+            return [('name',) + tuple(clause[1:])]
         else:
             ids = self.search([
-                ('bank_code',) + clause[1:],
+                ('bank_code',) + tuple(clause[1:]),
                 ], limit=1)
             if ids:
-                return [('bank_code',) + clause[1:]]
+                return [('bank_code',) + tuple(clause[1:])]
             else:
                 ids = self.search([
-                    ('bic',) + clause[1:],
+                    ('bic',) + tuple(clause[1:]),
                     ], limit=1)
                 if ids:
-                    return [('bic',) + clause[1:]]
-        return [(self._rec_name,) + clause[1:]]
+                    return [('bic',) + tuple(clause[1:])]
+        return [(self._rec_name,) + tuple(clause[1:])]
 
 Bank()