Hi,
I have a python method which is going to return a value. I want to call it on the inherit_id attribute of template tag. How can i achieve this?
Hi,
I have a python method which is going to return a value. I want to call it on the inherit_id attribute of template tag. How can i achieve this?
Hi
You can try this code
XML:
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="your_module_name.custom_template_tag_name">
<t t-set="value" t-value="your_python_method()"/>
<t t-esc="value"/>
</t>
</templates>
Hope it helps
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
2
août 25
|
3690 | |||
|
3
févr. 25
|
5252 | |||
|
0
mai 24
|
46 | |||
|
4
sept. 23
|
6494 | |||
|
2
sept. 23
|
8141 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.