Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
2166 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
3
Jul 24
3497
1
Jul 22
3152
0
Mei 20
1246
2
Mei 25
3781
1
Apr 25
1245