summaryrefslogtreecommitdiff
path: root/addons/payment_authorize/models/authorize_request.py
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2017-04-11 09:54:52 +0200
committerNicolas Martinelli <nim@odoo.com>2017-04-11 10:43:09 +0200
commitc9c110d088ecceef27e74ab2cd041ffb2f08de1a (patch)
tree5e31a83f30818204ce065dace4e19124c78bb183 /addons/payment_authorize/models/authorize_request.py
parent69b45530dcdd6d9dc8eb323d2e64b21d51bf9db1 (diff)
[FIX] payment_authorize: no partner email
When no email is defiend on the partner, a traceback is raised when paying with Authorize.net. The `text` attribute requires a string, not a boolean (`False` in this case). opw-728301
Diffstat (limited to 'addons/payment_authorize/models/authorize_request.py')
-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 28cba8db301..6eef3ae80cc 100644
--- a/addons/payment_authorize/models/authorize_request.py
+++ b/addons/payment_authorize/models/authorize_request.py
@@ -150,7 +150,7 @@ class AuthorizeAPI():
etree.SubElement(root, "transId").text = transaction_id
customer = etree.SubElement(root, "customer")
etree.SubElement(customer, "merchantCustomerId").text = 'ODOO-%s-%s' % (partner.id, uuid4().hex[:8])
- etree.SubElement(customer, "email").text = partner.email
+ etree.SubElement(customer, "email").text = partner.email or ''
response = self._authorize_request(root)
res = dict()
res['profile_id'] = response.find('customerProfileId').text