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

I have created a many2many field on product.product, relating it to another object.

Then I created a many2many field on the other object (relating it to the product), and also added a few other columns to that object.

When the product view is displayed it fetches all related data correctly (in a tree), but there is another column that I need to add (type: fields.function - float), but the value that this function has to return depends on the product that is being displayed. Since this function is in the other object, the product_id is not on the context. How could I get the product_id in order to get the other values needed (I have to pass the product_id as a parameter to another function) to calculate the value that this function has to return?

Thanks!!

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
4
يناير 24
23368
Attrs attribute تم الحل
2
يناير 24
2589
0
أغسطس 23
2376
5
سبتمبر 21
17680
3
يناير 21
17135