summaryrefslogtreecommitdiff
path: root/addons/website_customer/controllers
diff options
context:
space:
mode:
authorDenis Ledoux <dle@openerp.com>2014-01-30 17:36:39 +0100
committerDenis Ledoux <dle@openerp.com>2014-01-30 17:36:39 +0100
commitba09b1d4391cbfc3a931f00217a9de77a37823ca (patch)
tree1b658c82211038e6d4f5ccf31dbc228ced7a1a20 /addons/website_customer/controllers
parent6dca5f8f1ce714c443cb9895266b4076ff5cf418 (diff)
[FIX] website_customer: keep search even if we change the country, list of country display all countries where there is at least one matching result
bzr revid: dle@openerp.com-20140130163639-5z0pt5npgk0t3u8k
Diffstat (limited to 'addons/website_customer/controllers')
-rw-r--r--addons/website_customer/controllers/main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/website_customer/controllers/main.py b/addons/website_customer/controllers/main.py
index 921e88141f1..9e026c135a2 100644
--- a/addons/website_customer/controllers/main.py
+++ b/addons/website_customer/controllers/main.py
@@ -34,9 +34,6 @@ class WebsiteCustomer(http.Controller):
('website_description', 'ilike', post.get("search"))
]
- if country_id:
- domain += [('country_id', '=', country_id)]
-
# group by country, based on customers found with the search(domain)
countries = partner_obj.read_group(
cr, openerp.SUPERUSER_ID, domain, ["id", "country_id"],
@@ -48,6 +45,9 @@ class WebsiteCustomer(http.Controller):
'country_id': (0, _("All Countries"))
})
+ if country_id:
+ domain += [('country_id', '=', country_id)]
+
# search customers to display
partner_ids = partner_obj.search(cr, openerp.SUPERUSER_ID, domain, context=request.context)
google_map_partner_ids = ",".join([str(p) for p in partner_ids])