[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
This commit is contained in:
Nicolas Martinelli
2017-04-11 10:43:09 +02:00
parent 69b45530dc
commit c9c110d088
@@ -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