Merge lp:~openerp-dev/openobject-server/6.0-opw-17104-rha into lp:openobject-server/6.0

Proposed by Rifakat Husen (OpenERP)
Status: Merged
Approved by: Jay Vora (Serpent Consulting Services)
Approved revision: 3478
Merged at revision: 3481
Proposed branch: lp:~openerp-dev/openobject-server/6.0-opw-17104-rha
Merge into: lp:openobject-server/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
bin/osv/orm.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-server/6.0-opw-17104-rha
Reviewer Review Type Date Requested Status
Jay Vora (Serpent Consulting Services) (community) Approve
Review via email: mp+72993@code.launchpad.net

Description of the change

Hello,

While building up the domain in _where_calc() of class orm on a call of search method, 'active' field is only checked in self._columns but not in self._inherit_fields.

This fix solves the problem and adds domain correctly.

Thanks,
Rifakat

To post a comment you must log in.
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thanks for the good fix, Rifakat.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/osv/orm.py'
2--- bin/osv/orm.py 2011-06-20 11:12:35 +0000
3+++ bin/osv/orm.py 2011-08-26 05:37:23 +0000
4@@ -3850,7 +3850,7 @@
5 domain = domain[:]
6 # if the object has a field named 'active', filter out all inactive
7 # records unless they were explicitely asked for
8- if 'active' in self._columns and (active_test and context.get('active_test', True)):
9+ if 'active' in (self._columns.keys() + self._inherit_fields.keys()) and (active_test and context.get('active_test', True)):
10 if domain:
11 active_in_args = False
12 for a in domain: