[FIX] orm,expression: special-case previous commit for osv_memory

This will soon be obsolete and deleted, as soon
as osv_memory will be removed and merged inside
normal osv.

bzr revid: odo@openerp.com-20110924024928-awgncvhcyfkmnak5
This commit is contained in:
Olivier Dony 2011-09-24 04:49:28 +02:00
parent 67dcd97ea6
commit dfccbaf28b
2 changed files with 3 additions and 2 deletions

View File

@ -450,7 +450,7 @@ class expression(object):
# field could not be found in model columns, it's probably invalid, unless # field could not be found in model columns, it's probably invalid, unless
# it's one of the _log_access special fields # it's one of the _log_access special fields
# TODO: make these fields explicitly available in self.columns instead! # TODO: make these fields explicitly available in self.columns instead!
if field_path[0] not in MAGIC_COLUMNS: if (field_path[0] not in MAGIC_COLUMNS) and (left not in MAGIC_COLUMNS):
raise ValueError("Invalid field %r in domain expression %r" % (left, exp)) raise ValueError("Invalid field %r in domain expression %r" % (left, exp))
continue continue

View File

@ -2556,7 +2556,8 @@ LOG_ACCESS_COLUMNS = {
'write_date': 'TIMESTAMP' 'write_date': 'TIMESTAMP'
} }
# special columns automatically created by the ORM # special columns automatically created by the ORM
MAGIC_COLUMNS = ['id'] + LOG_ACCESS_COLUMNS.keys() MAGIC_COLUMNS = ['id'] + LOG_ACCESS_COLUMNS.keys() + \
['internal.create_uid', 'internal.date_access'] # for osv_memory only
class orm(orm_template): class orm(orm_template):
_sql_constraints = [] _sql_constraints = []