diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-03-27 18:22:18 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-03-27 18:22:18 +0200 |
| commit | 87a0f4dc4cac8dba95081269f1859861e1f7b0b9 (patch) | |
| tree | 09567fc0b60a5bde467478fcb1eb1cadbe243328 /addons/payment_authorize/models/authorize_request.py | |
| parent | 07843bd4c95b27ffccb196b3516421006c03b131 (diff) | |
| parent | b33d5af4a74e3f4ca515826d4683065e32005e85 (diff) | |
[MERGE] forward port branch 11.0 up to b33d5af4a74
Diffstat (limited to 'addons/payment_authorize/models/authorize_request.py')
| -rw-r--r-- | addons/payment_authorize/models/authorize_request.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment_authorize/models/authorize_request.py b/addons/payment_authorize/models/authorize_request.py index af710b280ba..138c270e35d 100644 --- a/addons/payment_authorize/models/authorize_request.py +++ b/addons/payment_authorize/models/authorize_request.py @@ -155,13 +155,13 @@ class AuthorizeAPI(): billTo = etree.SubElement(payment_profile, "billTo") etree.SubElement(billTo, "address").text = (partner.street or '' + (partner.street2 if partner.street2 else '')) or None - missing_fields = [partner._fields[field].string for field in ['city', 'country_id', 'zip'] if not partner[field]] + missing_fields = [partner._fields[field].string for field in ['city', 'country_id'] if not partner[field]] if missing_fields: raise ValidationError({'missing_fields': missing_fields}) etree.SubElement(billTo, "city").text = partner.city etree.SubElement(billTo, "state").text = partner.state_id.name or None - etree.SubElement(billTo, "zip").text = partner.zip + etree.SubElement(billTo, "zip").text = partner.zip or '' etree.SubElement(billTo, "country").text = partner.country_id.name or None payment = etree.SubElement(payment_profile, "payment") creditCard = etree.SubElement(payment, "creditCard") |
