summaryrefslogtreecommitdiff
path: root/addons/payment_authorize/models
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2019-01-09 13:44:06 +0000
committerJorge Pinna Puissant <jpp@odoo.com>2019-01-09 13:44:06 +0000
commit13e47f508fe37f986a6f72eb3551d859cac99a83 (patch)
tree7f803159e8e64b9bb356344df59704974188981e /addons/payment_authorize/models
parent313b133878579d146582f9e481267f1ef00736ac (diff)
[FIX] payment_authorize: customer profile without email
opw-1920083 Before this commit, an error arrived when creating a customer profile without email. Now, if the email don't exists we send an empty string to Authorize. closes odoo/odoo#30075
Diffstat (limited to 'addons/payment_authorize/models')
-rw-r--r--addons/payment_authorize/models/authorize_request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py
index 8a7b07c3b29..e23735fe037 100644
--- a/addons/payment_authorize/models/authorize_request.py
+++ b/addons/payment_authorize/models/authorize_request.py
@@ -134,7 +134,7 @@ class AuthorizeAPI():
root = self._base_tree('createCustomerProfileRequest')
profile = etree.SubElement(root, "profile")
etree.SubElement(profile, "merchantCustomerId").text = 'ODOO-%s-%s' % (partner.id, uuid4().hex[:8])
- etree.SubElement(profile, "email").text = partner.email
+ etree.SubElement(profile, "email").text = partner.email or ''
payment_profile = etree.SubElement(profile, "paymentProfiles")
etree.SubElement(payment_profile, "customerType").text = 'business' if partner.is_company else 'individual'
billTo = etree.SubElement(payment_profile, "billTo")