Early error warning when the browse constructor is called with wrong record id
bzr revid: bch-a7c9c4844f238e71edf1cf12cb90a5c5bbd5e70b
This commit is contained in:
parent
b4af1461c4
commit
e1155e4dab
|
@ -114,6 +114,7 @@ class browse_record_list(list):
|
|||
#
|
||||
class browse_record(object):
|
||||
def __init__(self, cr, uid, id, table, cache, context={}, list_class = None):
|
||||
assert id, 'Wrong ID for the browse record, got '+str(id)+ ', expected an integer.'
|
||||
self._list_class = list_class or browse_record_list
|
||||
self._cr = cr
|
||||
self._uid = uid
|
||||
|
|
Loading…
Reference in New Issue