From c9c110d088ecceef27e74ab2cd041ffb2f08de1a Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 11 Apr 2017 09:54:52 +0200 Subject: [PATCH] [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 --- addons/payment_authorize/models/authorize_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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