diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_payment/models/payment.py | 1 | ||||
| -rw-r--r-- | addons/payment/controllers/portal.py | 1 | ||||
| -rw-r--r-- | addons/payment_stripe/models/payment.py | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/addons/account_payment/models/payment.py b/addons/account_payment/models/payment.py index decad0d034a..202afcaf9c7 100644 --- a/addons/account_payment/models/payment.py +++ b/addons/account_payment/models/payment.py @@ -15,6 +15,7 @@ class PaymentTransaction(models.Model): def render_invoice_button(self, invoice, submit_txt=None, render_values=None): values = { 'partner_id': invoice.partner_id.id, + 'type': self.type, } if render_values: values.update(render_values) diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index 5fcc0147ab7..906424265cd 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -306,6 +306,7 @@ class WebsitePayment(http.Controller): render_values = { 'partner_id': partner_id, + 'type': tx.type, } return acquirer.sudo().render(tx.reference, float(amount), int(currency_id), values=render_values) diff --git a/addons/payment_stripe/models/payment.py b/addons/payment_stripe/models/payment.py index d09a6977c1c..84ad304d543 100644 --- a/addons/payment_stripe/models/payment.py +++ b/addons/payment_stripe/models/payment.py @@ -63,6 +63,8 @@ class PaymentAcquirerStripe(models.Model): 'payment_intent_data[description]': tx_values['reference'], 'customer_email': tx_values.get('partner_email') or tx_values.get('billing_partner_email'), } + if tx_values['type'] == 'form_save': + stripe_session_data['payment_intent_data[setup_future_usage]'] = 'off_session' self._add_available_payment_method_types(stripe_session_data, tx_values) |
