[FIX] payment_stripe: allow payment for client without mail
Problem: If you have a customer assigned to an invoice/quotation without an e-mail address and then share a payment link with the customer. If the customer clicks on 'Pay', he won't be redirected to Stripe's checkout page. He'll get instead 'Invalid e-mail address: False' (see the image attached). Explanation: When there is no e-mail address defined, Odoo sends 'False' to Stripe but Stripe sees it as the e-mail address which is indeed Invalid. To solve the issue we replace False by None for the email value of a customer without email address. opw-3007866 closes odoo/odoo#102867 X-original-commit: 647a5fd79b88d4ea00eca2d6c1f9d9a2259a8414 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com> Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
This commit is contained in:
@@ -146,7 +146,7 @@ class PaymentTransaction(models.Model):
|
||||
'address[postal_code]': self.partner_zip or None,
|
||||
'address[state]': self.partner_state_id.name or None,
|
||||
'description': f'Odoo Partner: {self.partner_id.name} (id: {self.partner_id.id})',
|
||||
'email': self.partner_email,
|
||||
'email': self.partner_email or None,
|
||||
'name': self.partner_name,
|
||||
'phone': self.partner_phone or None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user