For example, there are two models:
sale.order and purchase.order
Where we can select a product from the filtered list of products using one of your favorite filter by pressing on "Search more..."
How to set one filter for the first model, and another for the second model, if they standard for both?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
1
回覆
6410
瀏覽次數
Hi Gleb,
You can do it by passing the default search filter in the context of the o2m field in XML file by inheriting the view of related object.
Ex:
<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']" position="attributes">
<attribute name="context">{'search_default_ur_filter_name': 1}</attribute> # Here you need to add the original context from the base view as well
</attributes>
Thanks for the answer
I understand how to do it through the widget)
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
11月 23
|
3075 | ||
|
7
4月 21
|
20423 | ||
|
1
10月 20
|
4818 | ||
|
2
11月 16
|
4185 | ||
|
4
3月 15
|
21117 |