diff options
| author | Denis Ledoux <dle@openerp.com> | 2014-01-30 21:57:13 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@openerp.com> | 2014-01-30 21:57:13 +0100 |
| commit | 320b840341838864d9a2a481b183610baf9b04a8 (patch) | |
| tree | bc36fa28cc5528f28814bba75eee27e2b6b8deb3 /addons/website_customer/controllers/main.py | |
| parent | fc979b9a7a23bbfc8ea4367ecb6b00607eb13b72 (diff) | |
[FIX] website_membership, website_customer: keep search, country and assocations when jumping from each other of these filters + count fix between partners displayed and group by country count + fix country orders in website_customer
bzr revid: dle@openerp.com-20140130205713-09cbldm9r9pm6r1i
Diffstat (limited to 'addons/website_customer/controllers/main.py')
| -rw-r--r-- | addons/website_customer/controllers/main.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/website_customer/controllers/main.py b/addons/website_customer/controllers/main.py index 2ee5e446c5d..173b0871dbe 100644 --- a/addons/website_customer/controllers/main.py +++ b/addons/website_customer/controllers/main.py @@ -40,10 +40,6 @@ class WebsiteCustomer(http.Controller): groupby="country_id", orderby="country_id", context=request.context) country_count = partner_obj.search( cr, openerp.SUPERUSER_ID, domain, count=True, context=request.context) - countries.insert(0, { - 'country_id_count': country_count, - 'country_id': (0, _("All Countries")) - }) if country_id: domain += [('country_id', '=', country_id)] @@ -55,6 +51,11 @@ class WebsiteCustomer(http.Controller): }) countries.sort(key=lambda d: d['country_id'][1]) + countries.insert(0, { + 'country_id_count': country_count, + 'country_id': (0, _("All Countries")) + }) + # 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]) |
