diff --git a/currency_rate_update_coingecko/tests/test_currency_rate_update_coingecko.py b/currency_rate_update_coingecko/tests/test_currency_rate_update_coingecko.py index cb96420..d0fca55 100644 --- a/currency_rate_update_coingecko/tests/test_currency_rate_update_coingecko.py +++ b/currency_rate_update_coingecko/tests/test_currency_rate_update_coingecko.py @@ -23,7 +23,11 @@ def setUpClass(cls): cls.today = fields.Date.today() cls.eur_currency = cls.env.ref("base.EUR") cls.company = cls.Company.create( - {"name": "Test company", "currency_id": cls.eur_currency.id} + { + "name": "Test company", + "currency_id": cls.eur_currency.id, + "currency_rates_autoupdate": True, + } ) cls.lnk_currency = cls.Currency.create({"name": "LINK", "symbol": "LNK"}) cls.coingecko_provider = cls.CurrencyRateProvider.search( diff --git a/currency_rate_update_mapping/models/res_currency_rate_provider_mapping.py b/currency_rate_update_mapping/models/res_currency_rate_provider_mapping.py index e70ef96..63e3670 100644 --- a/currency_rate_update_mapping/models/res_currency_rate_provider_mapping.py +++ b/currency_rate_update_mapping/models/res_currency_rate_provider_mapping.py @@ -15,6 +15,7 @@ class ResCurrencyRateProviderMapping(models.Model): string="Provider", comodel_name="res.currency.rate.provider", ondelete="restrict", + required=True, ) provider_reference = fields.Char( required=True,