Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1620 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
zář 15
3599
0
dub 25
2163
2
úno 25
5971
1
pro 24
1495
0
čvc 24
1268