[FIX] osv_memory: load config params in __init__ to avoid uninitialized values

bzr revid: odo@openerp.com-20110601055031-xyungliji7snspsj
This commit is contained in:
Olivier Dony 2011-06-01 07:50:31 +02:00
parent eeeda53715
commit bf0e9e923c
1 changed files with 4 additions and 2 deletions

View File

@ -2054,8 +2054,8 @@ class orm_memory(orm_template):
_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', 'exists']
_inherit_fields = {}
_max_count = config.get('osv_memory_count_limit')
_max_hours = config.get('osv_memory_age_limit')
_max_count = None
_max_hours = None
_check_time = 20
@classmethod
@ -2067,6 +2067,8 @@ class orm_memory(orm_template):
self.datas = {}
self.next_id = 0
self.check_id = 0
self._max_count = config.get('osv_memory_count_limit')
self._max_hours = config.get('osv_memory_age_limit')
cr.execute('delete from wkf_instance where res_type=%s', (self._name,))
def _check_access(self, uid, object_id, mode):