fix: refactor code for better translatable string in stock_ageing.py
This commit is contained in:
parent
a671652ab2
commit
71a0ae2e59
@ -198,11 +198,11 @@ def setup_ageing_columns(filters: Filters, range_columns: List):
|
||||
f"0 - {filters['range1']}",
|
||||
f"{cint(filters['range1']) + 1} - {cint(filters['range2'])}",
|
||||
f"{cint(filters['range2']) + 1} - {cint(filters['range3'])}",
|
||||
f"{cint(filters['range3']) + 1} - {_('Above')}",
|
||||
_("{0} - Above").format(cint(filters['range3']) + 1),
|
||||
]
|
||||
for i, label in enumerate(ranges):
|
||||
fieldname = "range" + str(i + 1)
|
||||
add_column(range_columns, label=f"Age ({label})", fieldname=fieldname)
|
||||
add_column(range_columns, label=_("Age ({0})").format(label), fieldname=fieldname)
|
||||
|
||||
|
||||
def add_column(
|
||||
|
Loading…
x
Reference in New Issue
Block a user