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]) diff --git a/addons/website_customer/views/website_customer.xml b/addons/website_customer/views/website_customer.xml index e5b8cc44ecd..97b6fa29f80 100644 --- a/addons/website_customer/views/website_customer.xml +++ b/addons/website_customer/views/website_customer.xml @@ -81,7 +81,7 @@
  • - +