While developing a custom payment.provider, How to set Default payment journal as "bank".
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
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
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
3
févr. 25
|
5102 | ||
|
0
mai 24
|
1608 | ||
|
3
janv. 25
|
4795 | ||
|
2
juin 25
|
2312 | ||
|
1
sept. 24
|
2467 |