On Tuesday 14 December 2010, you wrote:
> @xrg,
> 
> may be a way to avoid side effects would be to define a new OpenERP float
> type that would allow differentiating Null/None. 

Well, this is a good idea, but a bit late: I've already been running my branch 
with the 'float null' patch for some time now, and only corrected one 
regression so far. Said that, I'm still voting against any changes for v6.0 
series; I'd rather not see any regressions at trunk now.

We can just schedule this change for v6.1, and fix all floats.

-- 
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/634634

Title:
  Searching on float fields does not work properly

Status in OpenObject Server:
  Confirmed

Bug description:
  Trying to search with [('float_field','=',3.28)] or 
[('float_field','=','3.28')] may not work correctly because OpenERP converts 
the value in the right into float before doing the search in the database. This 
is an issue because it means that one cannot relay on the search, even if the 
field in the database is NUMERIC instead of FLOAT. The reason is that the final 
query may end up being:

WHERE float_field = 3.2800012

which will not exist.

The attached patch, checks if field is of type float and allows 
[('float_field','=','3.28')] to be used and thus allow searching for exact 
numbers.



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to