From cfcd25df394bb4171b2d9d33a57101440757fc38 Mon Sep 17 00:00:00 2001 From: Samuel Degueldre Date: Fri, 19 May 2023 10:48:47 +0000 Subject: [PATCH] [REF] point_of_sale: remove CurrencyAmount component It's only used twice, in a single component, and it's used to do different things, one of which is just handled by formatCurrency already. It's been inlined to the only other use site. Part-of: odoo/odoo#122035 --- .../point_of_sale/static/src/js/Misc/CurrencyAmount.js | 7 ------- .../static/src/js/Popups/MoneyDetailsPopup.js | 2 -- .../static/src/xml/Misc/CurrencyAmount.xml | 10 ---------- .../static/src/xml/Popups/MoneyDetailsPopup.xml | 8 ++++++-- 4 files changed, 6 insertions(+), 21 deletions(-) delete mode 100644 addons/point_of_sale/static/src/js/Misc/CurrencyAmount.js delete mode 100644 addons/point_of_sale/static/src/xml/Misc/CurrencyAmount.xml diff --git a/addons/point_of_sale/static/src/js/Misc/CurrencyAmount.js b/addons/point_of_sale/static/src/js/Misc/CurrencyAmount.js deleted file mode 100644 index 7b27da75337..00000000000 --- a/addons/point_of_sale/static/src/js/Misc/CurrencyAmount.js +++ /dev/null @@ -1,7 +0,0 @@ -/** @odoo-module */ - -import { Component } from "@odoo/owl"; - -export class CurrencyAmount extends Component { - static template = "CurrencyAmount"; -} diff --git a/addons/point_of_sale/static/src/js/Popups/MoneyDetailsPopup.js b/addons/point_of_sale/static/src/js/Popups/MoneyDetailsPopup.js index 3982aa574c8..b0037953a77 100644 --- a/addons/point_of_sale/static/src/js/Popups/MoneyDetailsPopup.js +++ b/addons/point_of_sale/static/src/js/Popups/MoneyDetailsPopup.js @@ -2,12 +2,10 @@ import { AbstractAwaitablePopup } from "@point_of_sale/js/Popups/AbstractAwaitablePopup"; import { useState } from "@odoo/owl"; -import { CurrencyAmount } from "../Misc/CurrencyAmount"; import { usePos } from "@point_of_sale/app/pos_hook"; import { floatIsZero } from "@web/core/utils/numbers"; export class MoneyDetailsPopup extends AbstractAwaitablePopup { - static components = { CurrencyAmount }; static template = "MoneyDetailsPopup"; setup() { diff --git a/addons/point_of_sale/static/src/xml/Misc/CurrencyAmount.xml b/addons/point_of_sale/static/src/xml/Misc/CurrencyAmount.xml deleted file mode 100644 index 2ec97ff57f8..00000000000 --- a/addons/point_of_sale/static/src/xml/Misc/CurrencyAmount.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - diff --git a/addons/point_of_sale/static/src/xml/Popups/MoneyDetailsPopup.xml b/addons/point_of_sale/static/src/xml/Popups/MoneyDetailsPopup.xml index 036da5dc2ba..33c1eb73646 100644 --- a/addons/point_of_sale/static/src/xml/Popups/MoneyDetailsPopup.xml +++ b/addons/point_of_sale/static/src/xml/Popups/MoneyDetailsPopup.xml @@ -11,14 +11,18 @@
- +
Total - +