Skip to Content
Menú
This question has been flagged
1 Respondre
3081 Vistes

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?

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de febr. 25
2997
0
de maig 24
46
4
de set. 23
4522
2
de set. 23
6759
1
d’ag. 23
2263