summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-05-14 20:25:16 +0200
committerChristophe Simonis <chs@odoo.com>2018-05-14 20:25:16 +0200
commit45b4a4a4dd09fa6d8a2e18e52adf542f015124d7 (patch)
tree37dce25790962e677520f6abdffcb364df86abcb /addons
parent2b771757e2d02d1300400f743e9cae41dc7cf40f (diff)
parent62d93dad02f96e175043c03bd60df2f68885ff7e (diff)
[MERGE] forward port branch saas-15 up to 62d93dad02f
Diffstat (limited to 'addons')
-rw-r--r--addons/http_routing/geoipresolver.py4
-rw-r--r--addons/mass_mailing/models/mass_mailing.py1
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