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

I need to filter by warehouse inside products tree view. I did this but no changes happended, any help: 


xml version="1.0" encoding="UTF-8" ?>


id="view_product_filter_inherit" model="ir.ui.view">
name="name">view.move.search.inherit
name="model">product.template
name="inherit_id" ref="product.product_template_search_view"/>
name="arch" type="xml">
expr="//search" position="inside">
name="location_id" string="Product Warehouse" filter_domain="[('location_id.name', 'ilike', self)]"/>





Avatar
Zrušit
Nejlepší odpověď

You can't use location_id field in the search view because it's store=False

Go To stock > models > product.py in that find class ProductTemplate here you will get location_id field declaration

location_id = fields.Many2one('stock.location', 'Location', store=False)

 

Avatar
Zrušit
Autor

What should I use then? Can you help me with it please or provide a piece of code?

Related Posts Odpovědi Zobrazení Aktivita
1
čvc 18
44050
4
lis 23
3507
2
lis 23
3216
7
dub 21
20644
1
říj 20
4983