Skip to Content
Menu
This question has been flagged

i am using odoo studio app to configure the product page..

i have two many2one fields. the first one name is [custom product type] and the second one name is [ jewelry product type].

on the other hand each of this fields contains a records.

the first many2one field contains : [Jewelry Products], [Jewelry Materials], [Jewelry Packaging Products], [Jewelry Manufacturing Products] and the second one contains: [Finished], [Semi-Finished]

the first field Technical Name is : x_studio_many2one_field_p3h9M the second Technical Name is: x_studio_many2one_field_OMXi0

this is the Inherited View of Odoo Studio: product.template.product.form customization

` `

{}

{}1

{}

{}

(is not =) which is like this when i use: [["x_studio_many2one_field_p3h9M","!=","Jewelry Products"]] 2nd >> (=) which is like this when i use: [["x_studio_many2one_field_p3h9M","!=","Jewelry Products"]] 3rd >> (is set) which is like this when i use: [["x_studio_many2one_field_p3h9M","!=",False]] 4th >> (is not set) which is like this when i use: [["x_studio_many2one_field_p3h9M","=",False]]

none of them is not working correctly. could anyone help me?


Avatar
Discard
Best Answer

Hi,

To filter records based on the selection of another field in Odoo Studio, you can use domain expressions. Here's how you can achieve the desired filtering:

  1. Filter the records in the second many2one field based on the selection in the first many2one field.

Let's assume you want to filter the [jewelry product type] field based on the selection in the [custom product type] field.

You can use a dynamic domain expression in the [jewelry product type] field to achieve this. Here's how you can set it up:

In the [jewelry product type] field properties:

  • Field Name: x_studio_many2one_field_OMXi0
  • Domain: [["x_studio_many2one_field_p3h9M", "=", "Jewelry Products"]]

This domain expression will filter the [jewelry product type] field to only show records where the value of the [custom product type] field is "Jewelry Products".

Similarly, you can define different domain expressions for other values of the [custom product type] field.

Make sure to replace "Jewelry Products" with the actual name of the option in your [custom product type] field.

Repeat the above steps for each option in the [custom product type] field to set up appropriate filtering for the [jewelry product type] field based on the selection in the [custom product type] field.


Hope it helps

Avatar
Discard
Related Posts Replies Views Activity
2
Sep 15
3600
0
Apr 25
2168
2
Feb 25
5972
1
Dec 24
1495
0
Jul 24
1268