changeset b7c1fe255cb8 in modules/stock_lot:default
details: https://hg.tryton.org/modules/stock_lot?cmd=changeset&node=b7c1fe255cb8
description:
        Add methods to format number and symbol on Lang

        and add format number with symbol on Report

        issue10730
        review371831002
diffstat:

 stock.py |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r f360300abc2f -r b7c1fe255cb8 stock.py
--- a/stock.py  Thu Sep 23 23:12:35 2021 +0200
+++ b/stock.py  Mon Oct 04 18:52:01 2021 +0200
@@ -338,9 +338,8 @@
             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)

Reply via email to