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

i have row like below Structure:

Product  UOM    Barcode_one Barcode_Two Barcode_three Barcode_four

Orange   unit      123                   456                   789                    457

Orange   dozen                            378

Orange   pack      222        

when i search the barcode  with  barcode like   378  it will display only one row ..

Orange dozen                          378

i want to display all the 3 rows .. with any barcode ..

<record id="view_product_pricelist_item_filter" model="ir.ui.view">     

   <field name="name">product.pricelist.item.select</field>     

   <field name="model">product.pricelist.item</field>   

    <field name="arch" type="xml">          

  <search string="Search Product by Barcode

<field name="name" string="Barcode"        

        filter_domain= "['|','|','|',                 ('barcode_one','ilike',self),          

        ('barcode_two','ilike',self),           

        ('barcode_three', 'ilike', self),          

        ('barcode_four', 'ilike', self),                                  ]"/>         

</search>       

</field>  

  </record>

How to resolve it ?

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

Perhaps you could try achieving it in py-code, with the help of ORM Methods like name_search or search, depending on your desired result.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
2358
1
thg 7 25
874
1
thg 8 25
1151
0
thg 5 25
1328
2
thg 4 25
3527