** Changed in: openobject-server
   Importance: Undecided => Medium

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

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