Files
odoo_source/addons/website_payment/models/res_country.py
T
Thibault Libioulle 9eb8ea52e0 [IMP] website_payment: handle stripe supported countries
This commit warns company from countries not supported by Stripe to
activate Stripe from the settings page.

This commit also enable the Stripe Connect Onboarding from the website
settings page.

task-2789227

closes odoo/odoo#87562

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-06-28 18:25:00 +02:00

16 lines
569 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo.addons.payment_stripe.const import SUPPORTED_COUNTRIES as STRIPE_SUPPORTED_COUNTRIES
class ResCountry(models.Model):
_inherit = 'res.country'
is_stripe_supported_country = fields.Boolean(compute='_compute_is_stripe_supported_country')
@api.depends('code')
def _compute_is_stripe_supported_country(self):
for country in self:
country.is_stripe_supported_country = country.code in STRIPE_SUPPORTED_COUNTRIES