تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
2165 أدوات العرض

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


الصورة الرمزية
إهمال
أفضل إجابة

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

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
3
يوليو 24
3497
1
يوليو 22
3152
0
مايو 20
1246
2
مايو 25
3781
1
أبريل 25
1245