Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2647 Vistas

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
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
3
feb 25
2512
0
may 24
46
4
sept 23
4099
2
sept 23
6386
1
ago 23
1871