diff options
| author | Harry (Open ERP) <hmo@tinyerp.com> | 2009-10-13 19:39:37 +0530 |
|---|---|---|
| committer | Harry (Open ERP) <hmo@tinyerp.com> | 2009-10-13 19:39:37 +0530 |
| commit | a31e898d4423ceb3de45e70dafdb0e3b72dedbb1 (patch) | |
| tree | 97ee2701d05099e0542d77b0d108fb0c6239389e | |
| parent | 5d617aff5aa2e9abbad66540410f608efba55fc2 (diff) | |
[IMP]read method: to change for putting warning message on save event
bzr revid: hmo@tinyerp.com-20091013140937-5wb96hu59xn152r0
| -rw-r--r-- | bin/osv/orm.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/osv/orm.py b/bin/osv/orm.py index e64ff8bdfdd..52373b61f9c 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1476,7 +1476,7 @@ class orm_memory(orm_template): self.unlink(cr, uid, ids) return True - def read(self, cr, user, ids, fields_to_read=None, context=None, load='_classic_read'): + def read(self, cr, user, ids, fields_to_read=None, context=None, load='_classic_read'): if not context: context = {} if not fields_to_read: @@ -2213,12 +2213,13 @@ class orm(orm_template): select = ids if isinstance(ids, (int, long)): select = [ids] + select = map(lambda x: isinstance(x,dict) and x['id'] or x, select) result = self._read_flat(cr, user, select, fields, context, load) for r in result: for key, v in r.items(): if v == None: r[key] = False - if isinstance(ids, (int, long)): + if isinstance(ids, (int, long, dict)): return result and result[0] or False return result |
