Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1093 Переглядів

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

Аватар
Відмінити
Автор Найкраща відповідь

<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

Аватар
Відмінити
Найкраща відповідь

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

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
трав. 25
692
0
бер. 25
350
1
груд. 24
2784
1
жовт. 24
1690
0
вер. 24
761