Skip to Content
Menu
This question has been flagged

Hello, I am studio Module, so i want to add and field which I want to put the category of a product to then choose one of the product in this category.

the problem is I tried to make it but I just broke the thing, because before I could put the product and automatic the program put the price which I captured before in this product.

I want to put the category first, then the product inside this category and the need the program to capture automatic the price which I have.

I will attach a picture.



In the picture you can see the new field which I add so I need it to use it to put a category then in the product list I just need the product which are in the category which i put before.

thank you


Avatar
Discard
Best Answer

Hi,

If you successfully added the category field, i guess you have to filter the product list based on the selected category right ? If so you can add an onchange function for the newly added field and in the onchange function you can apply the domain for the product field.

For adding onchange function from user interface you can use the server action and see the following video to see to add onchange function and to return domain for a field.

  1. Add Onchange Function From User Interface In Odoo

  2. How To Give Domain For A Field Based On Another Field

Thanks

Avatar
Discard
Related Posts Replies Views Activity
3
Jul 24
1533
1
Jul 22
2069
0
May 20
802
0
Nov 24
62
0
Sep 24
133