Skip to content
Snippets Groups Projects
Commit 4870251f authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] payment: save credit card

- Set a payment provider with:
'Save Cards': 'Always'
'Payment Flow': 'Redirection to the acquirer website'
- Process an order on the eCommerce

The payment token is not saved.

The `save_token` value is based on the checkbox which is only added in
'ask' mode:

https://github.com/odoo/odoo/blob/4b8f72eb2315e675ca6d5a0d0961272fc024c475/addons/payment/static/src/js/payment_form.js#L162



We hide and pre-check the checkbox in this case.

opw-2008441
opw-2008275

closes odoo/odoo#34106

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 5af69281
No related branches found
No related tags found
No related merge requests found
......@@ -87,6 +87,9 @@
<input type="checkbox" name="o_payment_form_save_token" data-remove-me=""/>
Save my payment data
</label>
<t t-if="acq.save_token == 'always'">
<input type="checkbox" name="o_payment_form_save_token" checked="'checked'" class="o_hidden" data-remove-me=""/>
</t>
</div>
</t>
<t t-else="acq.payment_flow == 's2s'">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment