openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #14982
[Bug 1030942] Re: [trunk] expression : search with child_of crashes if 'id' is created in openerp
Can you please provide us a working scenario that reproduce the issue
with code that you have written in search domain?
** Changed in: openobject-server
Status: New => Incomplete
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1030942
Title:
[trunk] expression : search with child_of crashes if 'id' is created
in openerp
Status in OpenERP Server:
Incomplete
Bug description:
In the file osv/expression.py, line 444 :
if not field:
if left == 'id' and operator == 'child_of':
ids2 = to_ids(right, table)
dom = child_of_domain(left, ids2, working_table)
self.__exp = self.__exp[:i] + dom + self.__exp[i+1:]
else:
# 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:
raise ValueError("Invalid field %r in domain expression %r" % (left, exp))
continue
If the field 'id' is created in openerp, for a search with child_of,
the method crashes because it doesn't pass in the code. Indeed, in
that case "field" is not empty.
In my opinion, a search with child_of should support if the field
exists in openerp or not.
Regards,
Benoît
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1030942/+subscriptions
References