Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2815 Weergaven

While developing a custom payment.provider, How to set Default payment journal as "bank".

Avatar
Annuleer
Beste antwoord

Hi,
Inherit the payment.provider and add this code

 code = fields.Selection(selection_add=[('paytabs', 'paytabs')],
                            ondelete={'paytabs': 'set default'},
                            help="The technical code of this payment provider",
                            string="Code")

@api.model

def _get_payment_method_information(self):

"""Override to add create test payment method information to the

existing methods.

"""

res = super()._get_payment_method_information()

res['paytabs'] = {'mode': 'unique', 'domain': [('type', '=', 'bank')]}

return res
After completing these steps, your custom payment provider should appear on the list of available payment providers, and you can set the journal to "bank" as specified in your code.

Hope it helps

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
feb. 25
5035
0
mei 24
1545
3
jan. 25
4089
2
jun. 25
2192
1
sep. 24
2430