Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
865 Widoki

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.


Awatar
Odrzuć
Autor Najlepsza odpowiedź

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>

Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
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

Powiązane posty Odpowiedzi Widoki Czynność
2
lut 24
2868
2
cze 25
1605
0
mar 25
1471
0
lut 25
1126
3
sie 24
5822