Partner search: partial searching based on ZIP field not supported
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Low
|
OpenERP Publisher's Warranty Team |
Bug Description
1) Steps to reproduce the issue you have observed
A) Using the instance at demo.openerp.com, navigate to SALES->ADDRESS BOOK->CUSTOMERS
B) Click on the first record, Agrolait, to determine the ZIP for this customer (it should be 5478)
C) Return to list view and enter 5478 into the Contacts field at the top to search for this record - it should be found
D) Now enter 547 into the Contacts field - it should return no matches
2) The result you observed
I observed no matches
3) The result you expected
I was expecting to see the Agrolait record
4) The platform your are using
Ubuntu 10.0.4
5) The OpenERP version you are using (e.g. 5.0.15, 6.0-dev), if possible including the specific revision (e.g. rev. 2824) if you take the sources directly from Bazaar
6.1.1
Additional information: In the USA, zipcodes optionally contain 4 additional digits. A zipcode like 90210 may be fully expressed as 90210+1234 and both are valid to the postoffice. There is a need in the USA to search for 90210 and match all records starting with 90210, such as 90210+1234 and 90210+5678.
Changed in openobject-addons: | |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
importance: | Undecided → Low |
status: | New → Confirmed |
FIX FOR THIS BUG:
Make a small change to server\ openerp\ addons\ base\res\ res_partner. py:
Line 358 - change the search operator used to find matches.
ORIGINAL: ids = self.search(cr, user, [('zip','=',name)] + args, limit=limit, context=context)
CHANGE: ids = self.search(cr, user, [('zip' ,operator, name)] + args, limit=limit, context=context)