I used to use custom functions in jinja print format using the following structure in Frappe version 13:
- Defining the function and adding the @frappe.whiteliat() decorator to it.
- Defining it for jinja environment in hooks.py as follows:
jenv = {
“methods”: [
“print_discount:almozare_mod.api.print_discount”
]
} - Calling it in my custom print format as: {{ print_discount(…)}}
–
Now that I upgraded the system to version 14.
It gives me “print_discount” is not defined"!
Any help on that would be appreciated.