2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 20:15:44 +00:00

chery picked all fixed trans str from #1438 (#1554)

This commit is contained in:
Matthias Mair
2021-05-06 12:29:58 +02:00
committed by GitHub
parent 3511b4adda
commit 39d4129157
6 changed files with 26 additions and 30 deletions

View File

@ -367,7 +367,7 @@ class PurchaseOrder(Order):
stock.save()
text = _("Received items")
note = f"{_('Received')} {quantity} {_('items against order')} {str(self)}"
note = _('Received {n} items against order {name}').format(n=quantity, name=str(self))
# Add a new transaction note to the newly created stock item
stock.addTransactionNote(text, user, note)

View File

@ -1407,7 +1407,7 @@ class SalesOrderAssignSerials(AjaxView, FormMixin):
except StockItem.DoesNotExist:
self.form.add_error(
'serials',
_('No matching item for serial') + f" '{serial}'"
_('No matching item for serial {serial}').format(serial=serial)
)
continue
@ -1417,7 +1417,7 @@ class SalesOrderAssignSerials(AjaxView, FormMixin):
if not stock_item.in_stock:
self.form.add_error(
'serials',
f"'{serial}' " + _("is not in stock")
_('{serial} is not in stock').format(serial=serial)
)
continue
@ -1425,7 +1425,7 @@ class SalesOrderAssignSerials(AjaxView, FormMixin):
if stock_item.is_allocated():
self.form.add_error(
'serials',
f"'{serial}' " + _("already allocated to an order")
_('{serial} already allocated to an order').format(serial=serial)
)
continue