Skip to content

Commit 38493d3

Browse files
committed
Made provider mandatory for rate provider mappings and updated test scripts for currency_rate_update_coingecko module
1 parent 90fe723 commit 38493d3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

currency_rate_update_coingecko/tests/test_currency_rate_update_coingecko.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setUpClass(cls):
2323
cls.today = fields.Date.today()
2424
cls.eur_currency = cls.env.ref("base.EUR")
2525
cls.company = cls.Company.create(
26-
{"name": "Test company", "currency_id": cls.eur_currency.id}
26+
{"name": "Test company", "currency_id": cls.eur_currency.id, "currency_rates_autoupdate": True}
2727
)
2828
cls.lnk_currency = cls.Currency.create({"name": "LINK", "symbol": "LNK"})
2929
cls.coingecko_provider = cls.CurrencyRateProvider.search(

currency_rate_update_mapping/models/res_currency_rate_provider_mapping.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ResCurrencyRateProviderMapping(models.Model):
1515
string="Provider",
1616
comodel_name="res.currency.rate.provider",
1717
ondelete="restrict",
18+
required=True,
1819
)
1920
provider_reference = fields.Char(
2021
required=True,

0 commit comments

Comments
 (0)