From 3ab46d663b314c95cff5eea55d9d531d27b53f26 Mon Sep 17 00:00:00 2001 From: Mourad Date: Fri, 9 Feb 2024 11:11:50 +0100 Subject: [PATCH] [16.0][FIX] fix digits precision for ecotaxe amount on invoice --- l10n_fr_ecotaxe/data/decimal_precision.xml | 2 +- l10n_fr_ecotaxe/models/account_move.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/l10n_fr_ecotaxe/data/decimal_precision.xml b/l10n_fr_ecotaxe/data/decimal_precision.xml index 796619fc27..05e842e962 100644 --- a/l10n_fr_ecotaxe/data/decimal_precision.xml +++ b/l10n_fr_ecotaxe/data/decimal_precision.xml @@ -2,6 +2,6 @@ Ecotaxe - 3 + 4 diff --git a/l10n_fr_ecotaxe/models/account_move.py b/l10n_fr_ecotaxe/models/account_move.py index 6b9eb4b63e..a6ca92d9f4 100644 --- a/l10n_fr_ecotaxe/models/account_move.py +++ b/l10n_fr_ecotaxe/models/account_move.py @@ -9,8 +9,11 @@ class AccountMove(models.Model): _inherit = "account.move" - amount_ecotaxe = fields.Monetary( - string="Included Ecotaxe", store=True, compute="_compute_ecotaxe" + amount_ecotaxe = fields.Float( + digits="Ecotaxe", + string="Included Ecotaxe", + store=True, + compute="_compute_ecotaxe", ) @api.depends("invoice_line_ids.subtotal_ecotaxe")