Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
1017 Lượt xem
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-inherit="web.SearchPanelContent" t-inherit-mode="extension" owl="1">
<xpath expr="//div[@class='o_search_panel flex-grow-0 flex-shrink-0 h-100 pb-5 bg-view overflow-auto']" position="inside">
<div class="o_search_panel_control fa fa-long-arrow-left btn btn-icon" id='o_search_panel_control'
t-on-click="click_search_panel"/>
</xpath>
</t>
</templates>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Not working
if possible solve it

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Thank you very much for your reply,But the code reported an error,odoo.addons.web.controllers.binary: Parsing asset bundle web.assets_web.min.js has failed: file '/web_search_panel_hide_show/static/src/xml/search_panel.xml' The template name is missing。

I checked the cause and found that the error was caused by the <odoo> tag you added, but I still didn't see the effect I needed after I repaired it


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,


You can use the following code for adding a new div in the search panel.



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

<odoo>

<templates>

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

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

            <div class="o_search_panel_control fa fa-long-arrow-left btn btn-icon" id='o_search_panel_control'

                 t-on-click="click_search_panel"/>

        </xpath>

    </t>

</templates>

</odoo>


Hope it helps,

Ảnh đại diện
Huỷ bỏ