From d91070936d452b9603fa5ddc48f0ee23e096a1fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nshimiyimana=20S=C3=A9na?= Date: Fri, 10 Feb 2023 08:07:48 +0000 Subject: [PATCH] [FIX] account: remove references to `session.company_currency_id` Currently, there are a few references to a variable called `session.company_currency_id`. This variable used to be defined in the `web_dashboard`, a module that no longer exists. https://github.com/odoo/enterprise/blob/3d351aa3f8e4943df81bc09640ae16380e9a89f7/web_dashboard/models/ir_http.py#L14 (v15.3) This commit removes all references to `session.company_currency_id` in the `account` module. opw-3033656 closes odoo/odoo#112941 X-original-commit: aa0db63ecf8e6903ef3e664d8b22b00bf51ca1f2 Signed-off-by: Brice Bartoletti (bib) --- .../static/src/components/tax_totals/tax_totals.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/addons/account/static/src/components/tax_totals/tax_totals.js b/addons/account/static/src/components/tax_totals/tax_totals.js index 556f89712f3..ea45af337fe 100644 --- a/addons/account/static/src/components/tax_totals/tax_totals.js +++ b/addons/account/static/src/components/tax_totals/tax_totals.js @@ -4,7 +4,6 @@ import { formatFloat, formatMonetary } from "@web/views/fields/formatters"; import { parseFloat } from "@web/views/fields/parsers"; import { standardFieldProps } from "@web/views/fields/standard_field_props"; import { registry } from "@web/core/registry"; -import { session } from "@web/session"; const { Component, onPatched, onWillUpdateProps, useRef, useState } = owl; @@ -118,12 +117,7 @@ export class TaxTotalsComponent extends Component { } get currencyId() { - const recordCurrency = this.props.record.data.currency_id; - return recordCurrency ? recordCurrency[0] : session.company_currency_id; - } - - get currency() { - return session.currencies[this.currencyId]; + return this.props.record.data.currency_id; } invalidate() {