diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-14 20:25:16 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-14 20:25:16 +0200 |
| commit | 45b4a4a4dd09fa6d8a2e18e52adf542f015124d7 (patch) | |
| tree | 37dce25790962e677520f6abdffcb364df86abcb | |
| parent | 2b771757e2d02d1300400f743e9cae41dc7cf40f (diff) | |
| parent | 62d93dad02f96e175043c03bd60df2f68885ff7e (diff) | |
[MERGE] forward port branch saas-15 up to 62d93dad02f
| -rw-r--r-- | addons/http_routing/geoipresolver.py | 4 | ||||
| -rw-r--r-- | addons/mass_mailing/models/mass_mailing.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/addons/http_routing/geoipresolver.py b/addons/http_routing/geoipresolver.py index e95b9318eb2..24bbe723d6d 100644 --- a/addons/http_routing/geoipresolver.py +++ b/addons/http_routing/geoipresolver.py @@ -50,10 +50,10 @@ class GeoIPResolver(object): # Compatibility with Legacy database. # Some ips cannot be located to a specific country. Legacy DB used to locate them in # continent instead of country. Do the same to not change behavior of existing code. - country = r.country if r.country.geoname_id else r.continent + country, attr = (r.country, 'iso_code') if r.country.geoname_id else (r.continent, 'code') return { 'city': r.city.name, - 'country_code': country.iso_code, + 'country_code': getattr(country, attr), 'country_name': country.name, 'region': r.subdivisions[0].iso_code if r.subdivisions else None, 'time_zone': r.location.time_zone, diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index 24f24216ba0..83a4cb2278a 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -681,6 +681,7 @@ class MassMailing(models.Model): 'mass_mailing_id': mailing.id, 'mailing_list_ids': [(4, l.id) for l in mailing.contact_list_ids], 'no_auto_thread': mailing.reply_to_mode != 'thread', + 'template_id': None, } if mailing.reply_to_mode == 'email': composer_values['reply_to'] = mailing.reply_to |
