Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
894 Weergaven

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
Annuleer
Auteur Beste antwoord

<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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mrt. 25
283
0
feb. 25
523
1
dec. 24
2442
1
okt. 24
1531
0
sep. 24
724