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

Hello All,

I am new to the odoo,I want to add textbox and a button in the search box area of tree view.

Please help me on this.

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

Hi yogest, you cannot add the text box in the search view. You can add a filter for the search box.Try this example code in the your xml "search "view

        <record id="view_account_analytic_account_search" model="ir.ui.view">
            <field name="name">account.analytic.account.search</field>
            <field name="model">account.analytic.account</field>
            <field name="arch" type="xml">
                <search string="Analytic Account">
                    <filter string="Draft" icon="terp-go-home" domain="[('state','=','draft')]"  />
                    </group>
                </search>
            </field>
        </record>

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

Hi vasanth thankyou,

Since i am new to odoo,i didnt understand the filter attributes,Please explain the attributes,Specifically 'domain="[('state','=','draft')]".

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 18
2534
2
thg 3 23
10699
2
thg 3 23
2891
2
thg 5 22
5050
0
thg 3 22
1954