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

I want to inherit the web SearchPanelContent


<?xml version="1.0" encoding="UTF-8"?>

<templates id="template" xml:space="preserve">

    <t t-inherit="web.SearchPanelContent" t-inherit-mode="extension">

        <xpath expr="//div[@class='o_search_panel']" position="inside">

            <div class="my-custom-content">

                <h2>My Custom Content</h2>

                <p>这里是我添加的新内容。</p>

            </div>

        </xpath>

    </t>

</templates>

This way of writing is of no use

Avatar
Zrušit
Autor Nejlepší odpověď

<templates id="template" xml:space="preserve"> <!-- owl的 处理继承, web.SearchPanel --> <t t-inherit="web.SearchPanel.Regular" t-inherit-mode="extension"> <xpath expr="//header[hasclass('o_search_panel_section_header')]//b" position="after"> <t t-if="section.is_create == '1'"> <button class="btn btn-sm btn-default fa fa-plus" type="button" title="创建新的" style='float:right' t-on-click="() => this.addRecord(section)"/> </t> </xpath> </t></templates>

Thank you for your reply. I can write it this way

Avatar
Zrušit
Nejlepší odpověď

Hi,

Try this:

<?xml version="1.0" encoding="UTF-8"?>

<templates>

    <t t-name="documents.SearchPanelContent" t-inherit="web.SearchPanelContent" t-inherit-mode="primary">

        <xpath expr="//div[hasclass('o_search_panel')]" position="inside">

        </xpath>

     </t>

</templates>


Hope it helps

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
kvě 25
619
0
bře 25
329
1
pro 24
2693
1
říj 24
1652
0
zář 24
751