[MERGE] orm: add __iter__ method on browse_null.

Otherwise Python falls back to __getitem__ when trying to loop over it
or when trying to test `in`.

bzr revid: vmt@openerp.com-20130604081706-z79vqj36ls2adw09
This commit is contained in:
Vo Minh Thu 2013-06-04 10:17:06 +02:00
commit 6f1531f1d3
1 changed files with 3 additions and 0 deletions

View File

@ -282,6 +282,9 @@ class browse_null(object):
def __unicode__(self):
return u''
def __iter__(self):
raise NotImplementedError("Iteration is not allowed on %s" % self)
#
# TODO: execute an object method on browse_record_list