Fix #473 -- Internal name for categories and products (#900)

* Fix #473 -- Internal name for categories and products

* fix pdf renderer
This commit is contained in:
Raphael Michel
2018-05-11 12:53:25 +02:00
committed by GitHub
parent e678b52a7e
commit edeaa1333b
30 changed files with 152 additions and 55 deletions

View File

@@ -46,7 +46,7 @@ DEFAULT_VARIABLES = OrderedDict((
("item", {
"label": _("Product name"),
"editor_sample": _("Sample product"),
"evaluate": lambda orderposition, order, event: str(orderposition.item)
"evaluate": lambda orderposition, order, event: str(orderposition.item.name)
}),
("variation", {
"label": _("Variation name"),
@@ -62,8 +62,8 @@ DEFAULT_VARIABLES = OrderedDict((
"label": _("Product name and variation"),
"editor_sample": _("Sample product sample variation"),
"evaluate": lambda orderposition, order, event: (
'{} - {}'.format(orderposition.item, orderposition.variation)
if orderposition.variation else str(orderposition.item)
'{} - {}'.format(orderposition.item.name, orderposition.variation)
if orderposition.variation else str(orderposition.item.name)
)
}),
("item_category", {