[IMP] payment: Rename Payment Icon to Payment Method.
Payment Icon sounds confusig comparing to what it really is, payment method name makes it clearer for user to understand what it is. task-2882564 closes odoo/odoo#105678 Related: odoo/enterprise#33908 Related: odoo/upgrade#4029 Related: odoo/documentation#2955 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
id="payment_provider_menu"
|
||||
parent="account.root_payment_menu"
|
||||
sequence="10"/>
|
||||
<menuitem action="payment.action_payment_icon"
|
||||
id="payment_icon_menu"
|
||||
<menuitem action="payment.action_payment_method"
|
||||
id="payment_method_menu"
|
||||
parent="account.root_payment_menu"
|
||||
groups="base.group_no_one"
|
||||
sequence="15"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
'summary': "The payment engine used by payment provider modules.",
|
||||
'depends': ['portal'],
|
||||
'data': [
|
||||
'data/payment_icon_data.xml',
|
||||
'data/payment_method_data.xml',
|
||||
'data/payment_provider_data.xml',
|
||||
'data/payment_cron.xml',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
'views/payment_templates.xml',
|
||||
|
||||
'views/payment_provider_views.xml',
|
||||
'views/payment_icon_views.xml',
|
||||
'views/payment_method_views.xml',
|
||||
'views/payment_transaction_views.xml',
|
||||
'views/payment_token_views.xml', # Depends on `action_payment_transaction_linked_to_token`
|
||||
'views/res_partner_views.xml',
|
||||
|
||||
+30
-30
@@ -1,181 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="payment_icon_cc_visa" model="payment.icon">
|
||||
<record id="payment_method_visa" model="payment.method">
|
||||
<field name="sequence">10</field>
|
||||
<field name="name">VISA</field>
|
||||
<field name="image" type="base64" file="payment/static/img/visa.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_mastercard" model="payment.icon">
|
||||
<record id="payment_method_mastercard" model="payment.method">
|
||||
<field name="sequence">20</field>
|
||||
<field name="name">MasterCard</field>
|
||||
<field name="image" type="base64" file="payment/static/img/mastercard.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_american_express" model="payment.icon">
|
||||
<record id="payment_method_american_express" model="payment.method">
|
||||
<field name="sequence">30</field>
|
||||
<field name="name">American Express</field>
|
||||
<field name="image" type="base64" file="payment/static/img/american_express.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_discover" model="payment.icon">
|
||||
<record id="payment_method_discover" model="payment.method">
|
||||
<field name="sequence">40</field>
|
||||
<field name="name">Discover</field>
|
||||
<field name="image" type="base64" file="payment/static/img/discover.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_diners_club_intl" model="payment.icon">
|
||||
<record id="payment_method_diners_club_intl" model="payment.method">
|
||||
<field name="sequence">50</field>
|
||||
<field name="name">Diners Club International</field>
|
||||
<field name="image" type="base64" file="payment/static/img/diners_club_intl.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_paypal" model="payment.icon">
|
||||
<record id="payment_method_paypal" model="payment.method">
|
||||
<field name="sequence">60</field>
|
||||
<field name="name">Paypal</field>
|
||||
<field name="image" type="base64" file="payment/static/img/paypal.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_rupay" model="payment.icon">
|
||||
<record id="payment_method_rupay" model="payment.method">
|
||||
<field name="sequence">65</field>
|
||||
<field name="name">Rupay</field>
|
||||
<field name="image" type="base64" file="payment/static/img/rupay.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_apple_pay" model="payment.icon">
|
||||
<record id="payment_method_apple_pay" model="payment.method">
|
||||
<field name="sequence">70</field>
|
||||
<field name="name">Apple Pay</field>
|
||||
<field name="image" type="base64" file="payment/static/img/applepay.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_jcb" model="payment.icon">
|
||||
<record id="payment_method_jcb" model="payment.method">
|
||||
<field name="sequence">80</field>
|
||||
<field name="name">JCB</field>
|
||||
<field name="image" type="base64" file="payment/static/img/jcb.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_maestro" model="payment.icon">
|
||||
<record id="payment_method_maestro" model="payment.method">
|
||||
<field name="sequence">90</field>
|
||||
<field name="name">Maestro</field>
|
||||
<field name="image" type="base64" file="payment/static/img/maestro.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_cirrus" model="payment.icon">
|
||||
<record id="payment_method_cirrus" model="payment.method">
|
||||
<field name="sequence">100</field>
|
||||
<field name="name">Cirrus</field>
|
||||
<field name="image" type="base64" file="payment/static/img/cirrus.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_unionpay" model="payment.icon">
|
||||
<record id="payment_method_unionpay" model="payment.method">
|
||||
<field name="sequence">110</field>
|
||||
<field name="name">UnionPay</field>
|
||||
<field name="image" type="base64" file="payment/static/img/unionpay.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_bancontact" model="payment.icon">
|
||||
<record id="payment_method_bancontact" model="payment.method">
|
||||
<field name="sequence">120</field>
|
||||
<field name="name">Bancontact</field>
|
||||
<field name="image" type="base64" file="payment/static/img/bancontact.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_western_union" model="payment.icon">
|
||||
<record id="payment_method_western_union" model="payment.method">
|
||||
<field name="sequence">130</field>
|
||||
<field name="name">Western Union</field>
|
||||
<field name="image" type="base64" file="payment/static/img/western_union.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_sepa" model="payment.icon">
|
||||
<record id="payment_method_sepa" model="payment.method">
|
||||
<field name="sequence">140</field>
|
||||
<field name="name">SEPA Direct Debit</field>
|
||||
<field name="image" type="base64" file="payment/static/img/sepa.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_ideal" model="payment.icon">
|
||||
<record id="payment_method_ideal" model="payment.method">
|
||||
<field name="sequence">150</field>
|
||||
<field name="name">iDEAL</field>
|
||||
<field name="image" type="base64" file="payment/static/img/ideal.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_webmoney" model="payment.icon">
|
||||
<record id="payment_method_webmoney" model="payment.method">
|
||||
<field name="sequence">160</field>
|
||||
<field name="name">WebMoney</field>
|
||||
<field name="image" type="base64" file="payment/static/img/webmoney.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_giropay" model="payment.icon">
|
||||
<record id="payment_method_giropay" model="payment.method">
|
||||
<field name="sequence">170</field>
|
||||
<field name="name">Giropay</field>
|
||||
<field name="image" type="base64" file="payment/static/img/giropay.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_eps" model="payment.icon">
|
||||
<record id="payment_method_eps" model="payment.method">
|
||||
<field name="sequence">180</field>
|
||||
<field name="name">EPS</field>
|
||||
<field name="image" type="base64" file="payment/static/img/eps.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_p24" model="payment.icon">
|
||||
<record id="payment_method_p24" model="payment.method">
|
||||
<field name="sequence">190</field>
|
||||
<field name="name">P24</field>
|
||||
<field name="image" type="base64" file="payment/static/img/p24.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_cc_codensa_easy_credit" model="payment.icon">
|
||||
<record id="payment_method_codensa_easy_credit" model="payment.method">
|
||||
<field name="sequence">200</field>
|
||||
<field name="name">Codensa Easy Credit</field>
|
||||
<field name="image" type="base64" file="payment/static/img/codensa_easy_credit.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_kbc" model="payment.icon">
|
||||
<record id="payment_method_kbc" model="payment.method">
|
||||
<field name="sequence">210</field>
|
||||
<field name="name">KBC</field>
|
||||
<field name="image" type="base64" file="payment/static/img/kbc.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_mpesa" model="payment.icon">
|
||||
<record id="payment_method_mpesa" model="payment.method">
|
||||
<field name="sequence">220</field>
|
||||
<field name="name">M-Pesa</field>
|
||||
<field name="image" type="base64" file="payment/static/img/m-pesa.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_airtel_money" model="payment.icon">
|
||||
<record id="payment_method_airtel_money" model="payment.method">
|
||||
<field name="sequence">230</field>
|
||||
<field name="name">Airtel Money</field>
|
||||
<field name="image" type="base64" file="payment/static/img/airtel-money.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_mtn_mobile_money" model="payment.icon">
|
||||
<record id="payment_method_mtn_mobile_money" model="payment.method">
|
||||
<field name="sequence">240</field>
|
||||
<field name="name">MTN Mobile Money</field>
|
||||
<field name="image" type="base64" file="payment/static/img/mtn-mobile-money.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_barter_by_flutterwave" model="payment.icon">
|
||||
<record id="payment_method_barter_by_flutterwave" model="payment.method">
|
||||
<field name="sequence">250</field>
|
||||
<field name="name">Barter by Flutterwave</field>
|
||||
<field name="image" type="base64" file="payment/static/img/barter-by-flutterwave.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_sadad" model="payment.icon">
|
||||
<record id="payment_method_sadad" model="payment.method">
|
||||
<field name="sequence">260</field>
|
||||
<field name="name">Sadad</field>
|
||||
<field name="image" type="base64" file="payment/static/img/sadad.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_mada" model="payment.icon">
|
||||
<record id="payment_method_mada" model="payment.method">
|
||||
<field name="sequence">270</field>
|
||||
<field name="name">Mada</field>
|
||||
<field name="image" type="base64" file="payment/static/img/mada.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_bbva_bancomer" model="payment.icon">
|
||||
<record id="payment_method_bbva_bancomer" model="payment.method">
|
||||
<field name="sequence">280</field>
|
||||
<field name="name">BBVA Bancomer</field>
|
||||
<field name="image" type="base64" file="payment/static/img/bbva-bancomer.png"/>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_citibanamex" model="payment.icon">
|
||||
<record id="payment_method_citibanamex" model="payment.method">
|
||||
<field name="sequence">280</field>
|
||||
<field name="name">CitiBanamex</field>
|
||||
<field name="image" type="base64" file="payment/static/img/citibanamex.png"/>
|
||||
@@ -7,16 +7,16 @@
|
||||
<field name="image_128" type="base64" file="payment_adyen/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_adyen"/>
|
||||
<!-- https://www.adyen.com/payment-methods -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_bancontact'),
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_discover'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_unionpay'),
|
||||
ref('payment.payment_method_bancontact'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_discover'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_unionpay'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
<field name="image_128" type="base64" file="payment_aps/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_aps"/>
|
||||
<!-- https://paymentservices.amazon.com/docs/EN/24.html -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_sadad'),
|
||||
ref('payment.payment_icon_mada'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_sadad'),
|
||||
ref('payment.payment_method_mada'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
<field name="image_128" type="base64" file="payment_asiapay/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_asiapay"/>
|
||||
<!-- See https://www.asiapay.com/payment.html#option -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_unionpay'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_unionpay'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -57,14 +57,14 @@
|
||||
file="payment_authorize/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_authorize"/>
|
||||
<!-- https://www.authorize.net/solutions/merchantsolutions/onlinemerchantaccount/ -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_discover'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_discover'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
file="payment_buckaroo/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_buckaroo"/>
|
||||
<!-- https://www.buckaroo-payments.com/products/payment-methods/ -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_bancontact'),
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_method_bancontact'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -100,14 +100,14 @@
|
||||
file="payment_flutterwave/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_flutterwave"/>
|
||||
<!-- https://developer.flutterwave.com/docs/collecting-payments/payment-methods/ -->
|
||||
<field name="payment_icon_ids" eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_mpesa'),
|
||||
ref('payment.payment_icon_airtel_money'),
|
||||
ref('payment.payment_icon_mtn_mobile_money'),
|
||||
ref('payment.payment_icon_barter_by_flutterwave'),
|
||||
<field name="payment_method_ids" eval="[(6, 0, [
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_mpesa'),
|
||||
ref('payment.payment_method_airtel_money'),
|
||||
ref('payment.payment_method_mtn_mobile_money'),
|
||||
ref('payment.payment_method_barter_by_flutterwave'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -122,13 +122,13 @@
|
||||
<!-- Payment methods must be fetched from the API. See
|
||||
https://www.mercadopago.com.ar/developers/en/reference/payment_methods/_payment_methods/
|
||||
-->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_bbva_bancomer'),
|
||||
ref('payment.payment_icon_citibanamex')
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_bbva_bancomer'),
|
||||
ref('payment.payment_method_citibanamex')
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -137,20 +137,20 @@
|
||||
<field name="image_128" type="base64" file="payment_mollie/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_mollie"/>
|
||||
<!-- https://www.mollie.com/en/payments -->
|
||||
<field name="payment_icon_ids" eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_bancontact'),
|
||||
ref('payment.payment_icon_cc_eps'),
|
||||
ref('payment.payment_icon_cc_giropay'),
|
||||
ref('payment.payment_icon_cc_p24'),
|
||||
ref('payment.payment_icon_cc_ideal'),
|
||||
ref('payment.payment_icon_paypal'),
|
||||
ref('payment.payment_icon_apple_pay'),
|
||||
ref('payment.payment_icon_sepa'),
|
||||
ref('payment.payment_icon_kbc')
|
||||
<field name="payment_method_ids" eval="[(6, 0, [
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_bancontact'),
|
||||
ref('payment.payment_method_eps'),
|
||||
ref('payment.payment_method_giropay'),
|
||||
ref('payment.payment_method_p24'),
|
||||
ref('payment.payment_method_ideal'),
|
||||
ref('payment.payment_method_paypal'),
|
||||
ref('payment.payment_method_apple_pay'),
|
||||
ref('payment.payment_method_sepa'),
|
||||
ref('payment.payment_method_kbc')
|
||||
])]"/>
|
||||
|
||||
</record>
|
||||
@@ -160,16 +160,16 @@
|
||||
<field name="image_128" type="base64" file="payment_paypal/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_paypal"/>
|
||||
<!-- https://www.paypal.com/us/selfhelp/article/Which-credit-cards-can-I-accept-with-PayPal-Merchant-Services-FAQ1525#business -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_discover'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_unionpay'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_discover'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_unionpay'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -179,14 +179,14 @@
|
||||
<field name="image_128" type="base64" file="payment_razorpay/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_razorpay"/>
|
||||
<!-- https://razorpay.com/docs/payments/payment-methods/#supported-payment-methods -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_rupay'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_visa')
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_rupay'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_visa')
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -205,17 +205,17 @@
|
||||
<field name="image_128" type="base64" file="payment_sips/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_sips"/>
|
||||
<!-- See http://sips.worldline.com/en-us/home/features/payment-types-and-acquirers.html -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_discover'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_bancontact'),
|
||||
ref('payment.payment_icon_cc_unionpay'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_discover'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_bancontact'),
|
||||
ref('payment.payment_method_unionpay'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
@@ -228,15 +228,15 @@
|
||||
See https://stripe.com/payments/payment-methods-guide
|
||||
See https://support.goteamup.com/hc/en-us/articles/115002089349-Which-cards-and-payment-types-can-I-accept-with-Stripe-
|
||||
-->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_discover'),
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_discover'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import ir_http
|
||||
from . import payment_method
|
||||
from . import payment_provider
|
||||
from . import payment_icon
|
||||
from . import payment_token
|
||||
from . import payment_transaction
|
||||
from . import res_company
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class PaymentIcon(models.Model):
|
||||
_name = 'payment.icon'
|
||||
_description = 'Payment Icon'
|
||||
class PaymentMethod(models.Model):
|
||||
_name = 'payment.method'
|
||||
_description = 'Payment Method'
|
||||
_order = 'sequence, name'
|
||||
|
||||
name = fields.Char(string="Name")
|
||||
provider_ids = fields.Many2many(
|
||||
string="Providers", comodel_name='payment.provider',
|
||||
help="The list of providers supporting this payment icon")
|
||||
help="The list of providers supporting this payment method")
|
||||
image = fields.Image(
|
||||
string="Image", max_width=64, max_height=64,
|
||||
help="This field holds the image used for this payment icon, limited to 64x64 px")
|
||||
help="This field holds the image used for this payment method, limited to 64x64 px")
|
||||
image_payment_form = fields.Image(
|
||||
string="Image displayed on the payment form", related='image', store=True, max_width=45,
|
||||
max_height=30)
|
||||
@@ -47,8 +47,8 @@ class PaymentProvider(models.Model):
|
||||
related='company_id.currency_id',
|
||||
help="The main currency of the company, used to display monetary fields.",
|
||||
)
|
||||
payment_icon_ids = fields.Many2many(
|
||||
string="Supported Payment Icons", comodel_name='payment.icon')
|
||||
payment_method_ids = fields.Many2many(
|
||||
string="Supported Payment Methods", comodel_name='payment.method')
|
||||
allow_tokenization = fields.Boolean(
|
||||
string="Allow Saving Payment Methods",
|
||||
help="This controls whether customers can save their payment methods as payment tokens.\n"
|
||||
@@ -194,7 +194,7 @@ class PaymentProvider(models.Model):
|
||||
show_credentials_page = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_allow_tokenization = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_allow_express_checkout = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_payment_icon_ids = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_payment_method_ids = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_pre_msg = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_pending_msg = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
show_auth_msg = fields.Boolean(compute='_compute_view_configuration_fields')
|
||||
@@ -246,7 +246,7 @@ class PaymentProvider(models.Model):
|
||||
- `show_credentials_page`: Whether the "Credentials" notebook page should be shown.
|
||||
- `show_allow_tokenization`: Whether the `allow_tokenization` field should be shown.
|
||||
- `show_allow_express_checkout`: Whether the `allow_express_checkout` field should be shown.
|
||||
- `show_payment_icon_ids`: Whether the `payment_icon_ids` field should be shown.
|
||||
- `show_payment_method_ids`: Whether the `payment_method_ids` field should be shown.
|
||||
- `show_pre_msg`: Whether the `pre_msg` field should be shown.
|
||||
- `show_pending_msg`: Whether the `pending_msg` field should be shown.
|
||||
- `show_auth_msg`: Whether the `auth_msg` field should be shown.
|
||||
@@ -263,7 +263,7 @@ class PaymentProvider(models.Model):
|
||||
'show_credentials_page': True,
|
||||
'show_allow_tokenization': True,
|
||||
'show_allow_express_checkout': True,
|
||||
'show_payment_icon_ids': True,
|
||||
'show_payment_method_ids': True,
|
||||
'show_pre_msg': True,
|
||||
'show_pending_msg': True,
|
||||
'show_auth_msg': True,
|
||||
|
||||
@@ -2,8 +2,8 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_payment_link_wizard,access_payment_link_wizard,payment.model_payment_link_wizard,base.group_user,0,0,0,0
|
||||
payment_provider_onboarding_wizard,payment.provider.onboarding.wizard,model_payment_provider_onboarding_wizard,base.group_system,1,1,1,0
|
||||
payment_provider_system,payment.provider.system,model_payment_provider,base.group_system,1,1,1,1
|
||||
payment_icon_all,payment.icon.all,model_payment_icon,,1,0,0,0
|
||||
payment_icon_system,payment.icon.system,model_payment_icon,base.group_system,1,1,1,1
|
||||
payment_method_all,payment.method.all,model_payment_method,,1,0,0,0
|
||||
payment_method_system,payment.method.system,model_payment_method,base.group_system,1,1,1,1
|
||||
payment_token_all,payment.token.all,model_payment_token,,1,0,0,0
|
||||
payment_token_system,payment.token.system,model_payment_token,base.group_system,1,1,1,1
|
||||
payment_transaction_all,payment.transaction.all,model_payment_transaction,,1,0,0,0
|
||||
|
||||
|
@@ -462,7 +462,7 @@ odoo.define('payment.payment_form_mixin', require => {
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Hide all extra payment icons of the provider linked to the clicked button.
|
||||
* Hide all extra payment method icons of the provider linked to the clicked button.
|
||||
*
|
||||
* Called when clicking on the "show less" button.
|
||||
*
|
||||
@@ -475,14 +475,14 @@ odoo.define('payment.payment_form_mixin', require => {
|
||||
ev.stopPropagation();
|
||||
// Hide the extra payment icons, and the "show less" button
|
||||
const $itemList = $(ev.currentTarget).parents('ul');
|
||||
const maxIconNumber = $itemList.data('max-icons');
|
||||
const maxIconNumber = $itemList.data('max-icons-displayed');
|
||||
$itemList.children('li').slice(maxIconNumber).addClass('d-none');
|
||||
// Show the "show more" button
|
||||
$itemList.find('a[name="o_payment_icon_more"]').parents('li').removeClass('d-none');
|
||||
},
|
||||
|
||||
/**
|
||||
* Display all the payment icons of the provider linked to the clicked button.
|
||||
* Display all the payment methods icons of the provider linked to the clicked button.
|
||||
*
|
||||
* Called when clicking on the "show more" button.
|
||||
*
|
||||
@@ -493,7 +493,7 @@ odoo.define('payment.payment_form_mixin', require => {
|
||||
_onClickMorePaymentIcons: ev => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
// Display all the payment icons, and the "show less" button
|
||||
// Display all the payment methods icons, and the "show less" button
|
||||
$(ev.currentTarget).parents('ul').children('li').removeClass('d-none');
|
||||
// Hide the "show more" button
|
||||
$(ev.currentTarget).parents('li').addClass('d-none');
|
||||
|
||||
+11
-11
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="payment_icon_form" model="ir.ui.view">
|
||||
<field name="name">payment.icon.form</field>
|
||||
<field name="model">payment.icon</field>
|
||||
<record id="payment_method_form" model="ir.ui.view">
|
||||
<field name="name">payment.method.form</field>
|
||||
<field name="model">payment.method</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Payment Icon">
|
||||
<form string="Payment Method">
|
||||
<sheet>
|
||||
<field name="image" widget="image" class="oe_avatar"/>
|
||||
<div class="oe_title">
|
||||
@@ -21,9 +21,9 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="payment_icon_tree" model="ir.ui.view">
|
||||
<field name="name">payment.icon.tree</field>
|
||||
<field name="model">payment.icon</field>
|
||||
<record id="payment_method_tree" model="ir.ui.view">
|
||||
<field name="name">payment.method.tree</field>
|
||||
<field name="model">payment.method</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle"/>
|
||||
@@ -32,13 +32,13 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_payment_icon" model="ir.actions.act_window">
|
||||
<field name="name">Payment Icons</field>
|
||||
<field name="res_model">payment.icon</field>
|
||||
<record id="action_payment_method" model="ir.actions.act_window">
|
||||
<field name="name">Payment Methods</field>
|
||||
<field name="res_model">payment.method</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Create a payment icon
|
||||
Create a payment method
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
@@ -19,7 +19,7 @@
|
||||
<field name="show_credentials_page" invisible="1"/>
|
||||
<field name="show_allow_express_checkout" invisible="1"/>
|
||||
<field name="show_allow_tokenization" invisible="1"/>
|
||||
<field name="show_payment_icon_ids" invisible="1"/>
|
||||
<field name="show_payment_method_ids" invisible="1"/>
|
||||
<field name="show_pre_msg" invisible="1"/>
|
||||
<field name="show_pending_msg" invisible="1"/>
|
||||
<field name="show_auth_msg" invisible="1"/>
|
||||
@@ -79,7 +79,7 @@
|
||||
<group name="provider_config">
|
||||
<group string="Payment Form" name="payment_form">
|
||||
<field name="display_as" placeholder="If not defined, the provider name will be used."/>
|
||||
<field name="payment_icon_ids" attrs="{'invisible': [('show_payment_icon_ids', '=', False)]}" widget="many2many_tags"/>
|
||||
<field name="payment_method_ids" attrs="{'invisible': [('show_payment_method_ids', '=', False)]}" widget="many2many_tags"/>
|
||||
<field name="allow_tokenization" attrs="{'invisible': ['|', ('support_tokenization', '=', False), ('show_allow_tokenization', '=', False)]}"/>
|
||||
<field name="capture_manually" attrs="{'invisible': [('support_manual_capture', '=', False)]}"/>
|
||||
<field name="allow_express_checkout" attrs="{'invisible': ['|', ('support_express_checkout', '=', False), ('show_allow_express_checkout', '=', False)]}"/>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
</span>
|
||||
</t>
|
||||
</label>
|
||||
<!-- === Payment icon list === -->
|
||||
<!-- === Payment method icons list === -->
|
||||
<t t-call="payment.icon_list"/>
|
||||
<!-- === Help message === -->
|
||||
<div t-if="not is_html_empty(provider.pre_msg)"
|
||||
@@ -238,7 +238,7 @@
|
||||
Unpublished
|
||||
</span>
|
||||
</label>
|
||||
<!-- === Payment icon list === -->
|
||||
<!-- === Payment method icons list === -->
|
||||
<t t-call="payment.icon_list"/>
|
||||
<!-- === Help message === -->
|
||||
<div t-if="not is_html_empty(provider.pre_msg)"
|
||||
@@ -358,30 +358,30 @@
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<!-- Expandable payment icon list -->
|
||||
<template id="icon_list" name="Payment Icon List">
|
||||
<ul class="payment_icon_list float-end list-inline" data-max-icons="3">
|
||||
<!-- Expandable payment methods icons list -->
|
||||
<template id="icon_list" name="Payment Icons List">
|
||||
<ul class="payment_icon_list float-end list-inline" data-max-icons-displayed="3">
|
||||
<t t-set="icon_index" t-value="0"/>
|
||||
<t t-set="MAX_ICONS" t-value="3"/>
|
||||
<!-- === Icons === -->
|
||||
<t t-set="MAX_ICONS_DISPLAYED" t-value="3"/>
|
||||
<!-- === Icons list === -->
|
||||
<!-- Only shown if in the first 3 icons -->
|
||||
<t t-foreach="provider.payment_icon_ids.filtered(lambda r: r.image_payment_form)" t-as="icon">
|
||||
<li t-attf-class="list-inline-item{{'' if (icon_index < MAX_ICONS) else ' d-none'}}">
|
||||
<span t-esc="icon.image_payment_form"
|
||||
<t t-foreach="provider.payment_method_ids.filtered(lambda r: r.image_payment_form)" t-as="payment_method">
|
||||
<li t-attf-class="list-inline-item{{'' if (icon_index < MAX_ICONS_DISPLAYED) else ' d-none'}}">
|
||||
<span t-esc="payment_method.image_payment_form"
|
||||
t-options="{'widget': 'image', 'alt-field': 'name'}"
|
||||
data-bs-toggle="tooltip"
|
||||
t-att-title="icon.name"/>
|
||||
t-att-title="payment_method.name"/>
|
||||
</li>
|
||||
<t t-set="icon_index" t-value="icon_index + 1"/>
|
||||
</t>
|
||||
<t t-if="icon_index >= MAX_ICONS">
|
||||
<t t-if="icon_index >= MAX_ICONS_DISPLAYED">
|
||||
<!-- === "show more" button === -->
|
||||
<!-- Only displayed if too many payment icons -->
|
||||
<!-- Only displayed if too many icons -->
|
||||
<li style="display:block;" class="list-inline-item">
|
||||
<span class="float-end more_option text-info">
|
||||
<a name="o_payment_icon_more"
|
||||
data-bs-toggle="tooltip"
|
||||
t-att-title="', '.join([icon.name for icon in provider.payment_icon_ids[MAX_ICONS:]])">
|
||||
t-att-title="', '.join([pm.name for pm in provider.payment_method_ids[MAX_ICONS_DISPLAYED:]])">
|
||||
show more
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<field name="image_128" type="base64" file="payment_alipay/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_alipay"/>
|
||||
<!-- https://intl.alipay.com/ihome/home/about/buy.htm?topic=paymentMethods -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_jcb'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_western_union'),
|
||||
ref('payment.payment_icon_cc_webmoney'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_jcb'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_western_union'),
|
||||
ref('payment.payment_method_webmoney'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
<field name="code">alipay</field>
|
||||
<field name="redirect_form_view_id" ref="redirect_form"/>
|
||||
|
||||
@@ -74,16 +74,16 @@ class PaymentProvider(models.Model):
|
||||
def _onchange_authorize_payment_method_type(self):
|
||||
if self.authorize_payment_method_type == 'bank_account':
|
||||
self.display_as = _("Bank (powered by Authorize)")
|
||||
self.payment_icon_ids = [Command.clear()]
|
||||
self.payment_method_ids = [Command.clear()]
|
||||
else:
|
||||
self.display_as = _("Credit Card (powered by Authorize)")
|
||||
self.payment_icon_ids = [Command.set([self.env.ref(icon_xml_id).id for icon_xml_id in (
|
||||
'payment.payment_icon_cc_maestro',
|
||||
'payment.payment_icon_cc_mastercard',
|
||||
'payment.payment_icon_cc_discover',
|
||||
'payment.payment_icon_cc_diners_club_intl',
|
||||
'payment.payment_icon_cc_jcb',
|
||||
'payment.payment_icon_cc_visa',
|
||||
self.payment_method_ids = [Command.set([self.env.ref(pm_xml_id).id for pm_xml_id in (
|
||||
'payment.payment_method_maestro',
|
||||
'payment.payment_method_mastercard',
|
||||
'payment.payment_method_discover',
|
||||
'payment.payment_method_diners_club_intl',
|
||||
'payment.payment_method_jcb',
|
||||
'payment.payment_method_visa',
|
||||
)])]
|
||||
|
||||
# === ACTION METHODS ===#
|
||||
|
||||
@@ -38,7 +38,7 @@ class PaymentProvider(models.Model):
|
||||
super()._compute_view_configuration_fields()
|
||||
self.filtered(lambda p: p.code == 'custom').update({
|
||||
'show_credentials_page': False,
|
||||
'show_payment_icon_ids': False,
|
||||
'show_payment_method_ids': False,
|
||||
'show_pre_msg': False,
|
||||
'show_done_msg': False,
|
||||
'show_cancel_msg': False,
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
type="base64"
|
||||
file="payment_ogone/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_ogone"/>
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_ideal'),
|
||||
ref('payment.payment_icon_cc_bancontact'),
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_ideal'),
|
||||
ref('payment.payment_method_bancontact'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
<field name="code">ogone</field>
|
||||
<field name="redirect_form_view_id" ref="redirect_form"/>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
file="payment_payulatam/static/description/icon.png"/>
|
||||
<field name="module_id" ref="base.module_payment_payulatam"/>
|
||||
<!-- https://www.payulatam.com/medios-de-pago/ -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_diners_club_intl'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_icon_cc_codensa_easy_credit'),
|
||||
ref('payment.payment_method_diners_club_intl'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_visa'),
|
||||
ref('payment.payment_method_codensa_easy_credit'),
|
||||
])]"/>
|
||||
<field name="code">payulatam</field>
|
||||
<field name="redirect_form_view_id" ref="redirect_form"/>
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
<field name="module_id" ref="base.module_payment_payumoney"/>
|
||||
<!-- See https://www.payumoney.com/selfcare.html?userType=seller
|
||||
> Banks & Cards > What options do you have in the Credit Card payment? -->
|
||||
<field name="payment_icon_ids"
|
||||
<field name="payment_method_ids"
|
||||
eval="[(6, 0, [
|
||||
ref('payment.payment_icon_cc_maestro'),
|
||||
ref('payment.payment_icon_cc_mastercard'),
|
||||
ref('payment.payment_icon_cc_american_express'),
|
||||
ref('payment.payment_icon_cc_visa'),
|
||||
ref('payment.payment_method_maestro'),
|
||||
ref('payment.payment_method_mastercard'),
|
||||
ref('payment.payment_method_american_express'),
|
||||
ref('payment.payment_method_visa'),
|
||||
])]"/>
|
||||
<field name="code">payumoney</field>
|
||||
<field name="redirect_form_view_id" ref="redirect_form"/>
|
||||
|
||||
@@ -55,12 +55,12 @@ class PaymentTransaction(models.Model):
|
||||
:rtype: dict
|
||||
"""
|
||||
# Filter payment method types by available payment method
|
||||
existing_pms = [pm.name.lower() for pm in self.env['payment.icon'].search([])]
|
||||
linked_pms = [pm.name.lower() for pm in self.provider_id.payment_icon_ids]
|
||||
existing_pms = [pm.name.lower() for pm in self.env['payment.method'].search([])]
|
||||
linked_pms = [pm.name.lower() for pm in self.provider_id.payment_method_ids]
|
||||
pm_filtered_pmts = filter(
|
||||
lambda pmt: pmt.name == 'card'
|
||||
# If the PM (payment.icon) record related to a PMT doesn't exist, don't filter out the
|
||||
# PMT because the user couldn't even have linked it to the provider in the first place.
|
||||
# If the PM record related to a PMT doesn't exist, don't filter out the PMT because the
|
||||
# user couldn't even have linked it to the provider in the first place.
|
||||
or (pmt.name in linked_pms or pmt.name not in existing_pms),
|
||||
PAYMENT_METHOD_TYPES
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ class StripeCommon(PaymentCommon):
|
||||
'stripe_secret_key': 'sk_test_KJtHgNwt2KS3xM7QJPr4O5E8',
|
||||
'stripe_publishable_key': 'pk_test_QSPnimmb4ZhtkEy3Uhdm4S6J',
|
||||
'stripe_webhook_secret': 'whsec_vG1fL6CMUouQ7cObF2VJprLVXT5jBLxB',
|
||||
'payment_icon_ids': [(5, 0, 0)],
|
||||
'payment_method_ids': [(5, 0, 0)],
|
||||
})
|
||||
|
||||
cls.provider = cls.stripe
|
||||
|
||||
@@ -245,8 +245,8 @@
|
||||
action="payment.action_payment_token"
|
||||
groups="base.group_no_one"
|
||||
parent="menu_ecommerce_settings"/>
|
||||
<menuitem id="menu_ecommerce_payment_icons"
|
||||
action="payment.action_payment_icon"
|
||||
<menuitem id="menu_ecommerce_payment_methods"
|
||||
action="payment.action_payment_method"
|
||||
groups="base.group_no_one"
|
||||
parent="menu_ecommerce_settings"/>
|
||||
<menuitem id="menu_ecommerce_payment_transactions"
|
||||
|
||||
Reference in New Issue
Block a user