Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2270 Представления

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)]"/>





Аватар
Отменить
Лучший ответ

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)

 

Аватар
Отменить
Автор

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

Related Posts Ответы Просмотры Активность
1
июл. 18
44257
4
нояб. 23
3700
2
нояб. 23
3429
7
апр. 21
20893
1
окт. 20
5145