Revert "Allow PDF variables to provide a bulk evaluation method (#3517)"

This reverts commit 6ada83df9a.
This commit is contained in:
Richard Schreiber
2023-08-14 15:11:13 +02:00
parent 83811c0343
commit ddc94a8a16
2 changed files with 6 additions and 77 deletions

View File

@@ -683,16 +683,12 @@ dictionaries as values that contain keys like in the following example::
"product": {
"label": _("Product name"),
"editor_sample": _("Sample product"),
"evaluate": lambda orderposition, order, event: str(orderposition.item),
"evaluate_bulk": lambda orderpositions: [str(op.item) for op in orderpositions],
"evaluate": lambda orderposition, order, event: str(orderposition.item)
}
}
The ``evaluate`` member will be called with the order position, order and event as arguments. The event might
also be a subevent, if applicable.
The ``evaluate_bulk`` member is optional but can significantly improve performance in some situations because you
can perform database fetches in bulk instead of single queries for every position.
"""