Skip to Content
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
839 Представления

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 Ответы Просмотры Активность
0
мар. 25
262
0
февр. 25
484
1
дек. 24
2243
1
окт. 24
1426
0
сент. 24
698