İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2220 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 18
44108
4
Kas 23
3547
2
Kas 23
3292
7
Nis 21
20737
1
Eki 20
5029