bzr revid: fp@tinyerp.com-20081224104811-54gb87thafjay1sj
This commit is contained in:
Fabien Pinckaers
2008-12-24 11:48:11 +01:00
parent fb231cda53
commit c1c36eedea
2 changed files with 4 additions and 5 deletions
+1 -2
View File
@@ -1353,12 +1353,11 @@ class orm_memory(orm_template):
return result
class orm(orm_template):
_sql_constraints = []
_log_access = True
_table = None
_protected = ['read','write','create','default_get','perm_read','unlink','fields_get','fields_view_get','search','name_get','distinct_field_get','name_search','copy','import_data','search_count']
def _parent_store_compute(self, cr):
logger = netsvc.Logger()
logger.notifyChannel('init', netsvc.LOG_INFO, 'Computing parent left and right for table %s...' % (self._table, ))
+3 -3
View File
@@ -572,9 +572,9 @@ class cache(object):
if time.time()-self.timeout > self.lasttime:
self.lasttime = time.time()
t = time.time()-self.timeout
old_keys = [key for key in self.cache if self.cache[key][1] < t]
for key in old_keys:
del self.cache[key]
for key in self.cache.keys():
if self.cache[key][1]<t:
del self.cache[key]
if cr is None:
self.cache = {}