Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
861 Zobrazení

Hi all


Any idea how I can modify the standard search view?

https://snipboard.io/WSqUws.jpg

When we search for a product now, Odoo looks for the following rules:

  • Internal Reference contains "search query"
  • Products > Internal Reference contains "search query"
  • Name contains "search query"
  • Barcode contains "search query"

I want to add the Vendor Product Code as a standard query.

  • Vendors > Vendor Product Code contains "search query"

https://snipboard.io/BgeaCM.jpg

But I can't seem to find the view to make this happen. 


Any tips would be appreciated.


Avatar
Zrušit
Autor Nejlepší odpověď

Tried https://www.odoo.com/nl_NL/forum/help-1/how-to-search-for-vendor-product-code-in-product-list-264308

But that doesn't seem to work: https://snipboard.io/7mYHdM.jpg

If I look for products it won't look for the vender product code.

https://snipboard.io/pQrJ9S.jpg

So I'm looking on the wrong place?


I was looking for the wrong function, this seems to work:

<xpath expr="//field[@name='name']" position="attributes">
    <attribute name="filter_domain">
        ['|', '|', '|', '|',
        ('default_code', 'ilike', self),
        ('product_variant_ids.default_code', 'ilike', self),
        ('name', 'ilike', self),
        ('barcode', 'ilike', self),
        ('seller_ids.product_code', 'ilike', self)
        ]
    </attribute>
</xpath>

Avatar
Zrušit
Nejlepší odpověď

Did you search the Forum to check if this was already answered?

https://www.odoo.com/forum/help-1/how-can-i-search-my-products-by-the-code-and-or-name-that-the-supplier-vendor-has-for-them-245435


https://www.odoo.com/forum/help-1/how-to-search-for-vendor-product-code-in-product-list-264308


Avatar
Zrušit
Autor

You search better than me. I didn't find those.
Let's see I can find the base Search View and try. Thanks Ray

Related Posts Odpovědi Zobrazení Aktivita
2
úno 24
2867
2
čvn 25
1602
0
bře 25
1471
0
úno 25
1125
3
srp 24
5820