Help

How to search float fields in v7 without Advanced Search?

Closed
Avatar
Keyur

The question has been closed

by
Keyur
on 12/18/2013 09:31:44

I want to search records by some float value.

For example,
I want to search invoices, which have total 10000.00 So how can I search invoices by entering float values?

Please any suggestions appreciated.

2 Comments
Avatar
Discard

You have following options: 1. Add the field into search panel. 2. Use advanced search. 3. Override search() to make your search extensive.

Avatar
Keyur
-

It is still not working.Even float field is added in search panel it is not showing results only characters field are showing results.It is not proper way to override search method just to add a float field in search panel, in version 6.0 it was easy to add field in search panel, it fetches the proper result accordingly but in v7 it only consider a character field.And I am sorry I want it without using advanced search.

1 Answer
4
Avatar
Ray Carnes
Best Answer

This is a bug.

A fix was supplied on March 28th in revision 3869 of the web branch, but this hasn't yet made it into the core code.

[FIX] web: int/float fields were not offering auto-completion in search views, making *them un-searchable except via advanced search.

Added the missing complete() function and removed the incorrect value_from() override that seemed to be a leftover remnant of the 6.1 search field implementation ofg et_value(), wrongly renamed for 7.0.

I encountered this same problem today, and applying the DIFF resolved it.

I can now add float fields to the search view as we could before and users can now apply their search string to them.

2 Comments
Avatar
Discard
Avatar
Ray Carnes
-

The order of the fields determines the order of the options in the Search X For: dropdown. If TOTAL is the field you want to search by first (by default if the user does not make a selection) then it needs to be the first field in the view.

Avatar
Olivier Dony (odo)
-

The fix for this bug was merged at revision 3901 of the 7.0 openerp-web branch. It should be available in nightly build as of tomorrow.