Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2873 Lượt xem

hi,

I have a table called product.templete which shows list of all products. In product table i have created a field called Product category(Selection DataType) contains Models and Parts.

In quotation menu, i have created two Order Lines tab, one is for Models Order Lines and another tab is for Parts Order Lines.

In Product menu i created a product and selected product category as "Models" and save the product.

In Quotation menu, Models Order Lines tab when i select product it should show the list of only related to Models(Product Category). It should not show the list of Parts(Product Category).

How can we make this filter? These two Models and Parts data are saving in one table(product.template).

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hello Supreeth,

You just have to set the domain on your product_id field in xml file.

EX:

<field name="product_id" domain="[('category_type', '=', 'models')]"/>

This domain will show you only those products which are of type models.

Hope this helps you.

Ảnh đại diện
Huỷ bỏ
Tác giả

thank you

Sudhir Arya