[FIX] osv: small imp for if condition
authorRifakat (OpenERP) <rha@tinyerp.com>
Fri, 24 Feb 2012 13:12:20 +0000 (18:42 +0530)
committerRifakat (OpenERP) <rha@tinyerp.com>
Fri, 24 Feb 2012 13:12:20 +0000 (18:42 +0530)
bzr revid: rha@tinyerp.com-20120224131220-xy7cufigwqpk4mnc

1  2 
bin/osv/orm.py

diff --cc bin/osv/orm.py
@@@ -2065,9 -2063,12 +2065,8 @@@ class orm_memory(orm_template)
          f = False
          if result:
              for id, data in self.datas.items():
-                 counter = counter + 1
                  data['id'] = id
-                 if limit and (counter > int(limit)):
 -                # If no offset, give the first entries between 0 and the limit
 -                if not offset and limit and (counter > int(limit)):
 -                    break
 -                # If offset, give only entries between offset and the offset+limit
 -                elif offset and limit and (counter > int(limit + offset)):
++                if limit and (counter > int(limit) + int(offset)):
                      break
                  f = True
                  for arg in result: