İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
3401 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Şub 25
3645
0
May 24
46
4
Eyl 23
4899
2
Eyl 23
7119
1
Ağu 23
2580