Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/16.0' into 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed Sep 27, 2024
2 parents 3b73d38 + fa858c7 commit ea15f5e
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions addons/hr_expense/static/src/components/expense_dashboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @odoo-module */

import { useService } from '@web/core/utils/hooks';
import session from 'web.session';
import { formatMonetary } from "@web/views/fields/formatters";

const { Component, onWillStart, useState } = owl;

Expand All @@ -22,16 +22,7 @@ export class ExpenseDashboard extends Component {
}

renderMonetaryField(value, currency_id) {
value = value.toFixed(2);
const currency = session.get_currency(currency_id);
if (currency) {
if (currency.position === "after") {
value += currency.symbol;
} else {
value = currency.symbol + value;
}
}
return value;
return formatMonetary(value, { currencyId: currency_id});;
}
}
ExpenseDashboard.template = 'hr_expense.ExpenseDashboard';

0 comments on commit ea15f5e

Please sign in to comment.