c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #30312
[Bug 817003] Re: [trunk] F2 causes crash on many2one fields if a domain is also applied
Hello Francois Degrave,
I have tested your scenario as per your specification but still I did't
face any problem.
Would you please try again and informed us if you still faced the
problem.
Thanks and waiting for your reply.
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/817003
Title:
[trunk] F2 causes crash on many2one fields if a domain is also applied
Status in OpenERP Web Client:
New
Bug description:
Hi everyone!
Here is the thing: let us assume I define a module "module", and 3
objects "b", "c" and "d".
"b" has a many2one field to "c" called "c_id"
"c" has a many2one field to "d" called "d_id"
I define a tree view for "b". It is an editable tree view (editable="top" in my case).
(the error occurs as well in a form view)
There is a domain on "c_id" which is [("d_id","=",9)]
-> remark : there is a "d" record with id 9, and there is at least one "c" record with "d_id=9"
In this "b" view, I edit a record and type "ttt" in the "c_id" field.
Then I type F2.
EXPECTED RESULT: a pop-up list opens, with a "create" button if a
record containing "ttt" (and in which "d_id=9") does not exist yet.
ACTUAL RESULT: Crash. Here is the error I get (I modified the names to
be consistent with the example here above):
TypeError: not all arguments converted during string formatting
-> res = self._obj.execute(query, params)
(Pdb) params
[9, '%ttt%']
(Pdb) query
'SELECT "module_c".id FROM "module_c" WHERE module_c.d_id = %s) AND (module_c.name ilike \'ttt\') ORDER BY d_id desc limit 10'
The query is badly built of course, since the "ttt" has already been
introduced while it should still be "%s".
Final remark: I think the example is minimal.
See you guys!
François
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client-web/+bug/817003/+subscriptions
References