diff options
| author | Olivier Dony <odo@openerp.com> | 2011-09-24 04:49:28 +0200 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2011-09-24 04:49:28 +0200 |
| commit | dfccbaf28b77fef5860b9ad60ffdf97f3b4a64e0 (patch) | |
| tree | 1daea0f7a190c5cd64d74e8a7ec411fc83c51cad | |
| parent | 67dcd97ea62a8822517d8d3bb08c8623045e48ee (diff) | |
[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
| -rw-r--r-- | openerp/osv/expression.py | 2 | ||||
| -rw-r--r-- | openerp/osv/orm.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/openerp/osv/expression.py b/openerp/osv/expression.py index cb8cfea583f..ff2528db73d 100644 --- a/openerp/osv/expression.py +++ b/openerp/osv/expression.py @@ -450,7 +450,7 @@ class expression(object): # field could not be found in model columns, it's probably invalid, unless # it's one of the _log_access special fields # 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)) continue diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 0dd7d487bba..37dd1010d2f 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -2556,7 +2556,8 @@ LOG_ACCESS_COLUMNS = { 'write_date': 'TIMESTAMP' } # 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): _sql_constraints = [] |
