Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1894 Lượt xem

I created a custom view in Odoo backend but I am not able to implement a search for it. Any clue on how to create a custom search method for it? 


One of the error if a search bar is created and used like normal variants:

TypeError: Cannot read properties of undefined (reading 'domain')

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


custom.search.view
custom.model







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

<record id="custom_search_view" model="ir.ui.view">
<field name="name">custom.search.view</field>
<field name="model">custom.model</field>
<field name="arch" type="xml">
<search string="Search">
<field name="field_name"/>
<separator/>
</search>
</field>
</record>

Tác giả

Hi Sandron, thanks for your reply but that solution does not work for some reason since I am using a custom widget

Hi Zhi,

If possible, can you share the code and the corresponding full stack trace of the error?