تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1056 أدوات العرض

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مايو 25
669
0
مارس 25
332
1
ديسمبر 24
2726
1
أكتوبر 24
1667
0
سبتمبر 24
755