Skip to content

Commit

Permalink
[MIG] account_invoice_pricelist: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Nov 28, 2023
1 parent 6b862f0 commit 2c5c7fe
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ def setUpClass(cls):
],
}
)
cls.env.ref("base.EUR").active = True
cls.euro_currency = cls.env["res.currency"].search([("name", "=", "EUR")])
cls.usd_currency = cls.env["res.currency"].search([("name", "=", "USD")])
cls.sale_pricelist_with_discount_in_euros = cls.ProductPricelist.create(
Expand Down Expand Up @@ -224,14 +225,13 @@ def setUpClass(cls):
}
)
# Fix currency rate of EUR -> USD to 1.5289
usd_currency = cls.env["res.currency"].search([("name", "=", "USD")])
usd_rates = cls.env["res.currency.rate"].search(
[("currency_id", "=", usd_currency.id)]
[("currency_id", "=", cls.usd_currency.id)]
)
usd_rates.unlink()
cls.env["res.currency.rate"].create(
{
"currency_id": usd_currency.id,
"currency_id": cls.usd_currency.id,
"rate": 1.5289,
"create_date": "2010-01-01",
"write_date": "2010-01-01",
Expand Down

0 comments on commit 2c5c7fe

Please sign in to comment.