Skip to content

Commit

Permalink
Py3 related fix. (dict.keys() -> list(dict))
Browse files Browse the repository at this point in the history
  • Loading branch information
katyukha committed Jul 27, 2015
1 parent 6239320 commit f337427
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openerp_proxy/orm/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def prefetch_fields(self, fields):
to_prefetch, related = self.parse_prefetch_fields(fields)

col_info = self._object.columns_info
for data in self._object.read(self.keys(), to_prefetch):
for data in self._object.read(list(self), to_prefetch):
for field, value in data.iteritems():

# Fill related cache
Expand Down
4 changes: 2 additions & 2 deletions openerp_proxy/orm/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def _name(self):
"""
if self._data.get('__name_get_result', None) is None:
lcache = self._lcache
data = self._object.name_get(lcache.keys(), context=self.context)
data = self._object.name_get(list(lcache), context=self.context)
for _id, name in data:
lcache[_id]['__name_get_result'] = name
return self._data.get('__name_get_result', 'ERROR')
Expand Down Expand Up @@ -218,7 +218,7 @@ def read(self, fields=None, context=None, multi=False):
:rtype: dict
"""
ctx = {} if self.context is None else self.context.copy()
args = [self._lcache.keys()] if multi else [[self.id]]
args = [list(self._lcache)] if multi else [[self.id]]

kwargs = {}

Expand Down

0 comments on commit f337427

Please sign in to comment.