From 701e4f899efaa5c2c285c9cb4f072f9f7d98a502 Mon Sep 17 00:00:00 2001 From: Maxime Richez Date: Mon, 4 Oct 2021 18:52:01 +0200 Subject: [PATCH] Add methods to format number and symbol on Lang and add format number with symbol on Report issue10730 review371831002 --- stock.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stock.py b/stock.py index ef4c40800e..e00d6adffd 100644 --- a/stock.py +++ b/stock.py @@ -338,9 +338,8 @@ class MoveAddLots(Wizard): lot_quantity = self.record.quantity - quantity_remaining raise ValidationError(gettext( 'stock_lot.msg_move_add_lot_quantity', - lot_quantity=lang.format('%.*f', (digits, lot_quantity)), - move_quantity=lang.format( - '%.*f', (digits, move_quantity)))) + lot_quantity=lang.format_number(lot_quantity, digits), + move_quantity=lang.format_number(move_quantity, digits))) lots = [] for line in self.start.lots: lot = line.get_lot(self.record)