From e2ef2a178296dc178880b96a2e6bdf62e0f3f819 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 21 Nov 2008 23:09:37 +0100 Subject: [PATCH] [FIX] allow long to be used as id in browse_record bzr revid: christophe@tinyerp.com-20081121220937-psm6o20p3yqkq98i --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 75aa1146243..2da4b812a98 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -116,7 +116,7 @@ class browse_record(object): ''' if not context: context = {} - assert id and type(id)==type(1), _('Wrong ID for the browse record, got %s, expected an integer.') % str(id) + assert id and isinstance(id, (int, long,)), _('Wrong ID for the browse record, got %r, expected an integer.') % (id,) self._list_class = list_class or browse_record_list self._cr = cr self._uid = uid