From 13e47f508fe37f986a6f72eb3551d859cac99a83 Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 9 Jan 2019 13:44:06 +0000 Subject: [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 --- addons/payment_authorize/models/authorize_request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/payment_authorize/models/authorize_request.py') 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") -- cgit v1.2.3