Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
2295 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Juli 18
44306
4
Nov. 23
3727
2
Nov. 23
3463
7
Apr. 21
20939
1
Okt. 20
5163