Partner search: partial searching based on ZIP field not supported

Bug #987438 reported by Ray Carnes
8
This bug affects 1 person
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.

Revision history for this message
Ray Carnes (rcarnes) wrote :

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)

summary: - Partial searching of ZIP field not supported for Customers
+ Partner search: partial searching based on ZIP field not supported
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Ray,

The Search on partner by address/contacts was Recently fixed on bug 971627.

But you brought a good point by the way, zip should also be allowed to be searched as a partial match.

Thanks,
Serpent Consulting Services.

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Guys,

This is well discussed here: https://bugs.launchpad.net/openobject-server/+bug/971627 all courtesy to Olivier Dony!

Hope someone to have a look and RIP the bug (atleast with an OPW).

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.