Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3202 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
úno 25
3252
0
kvě 24
46
4
zář 23
4676
2
zář 23
6897
1
srp 23
2405