Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4078 มุมมอง

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!!

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ม.ค. 24
23327
Attrs attribute แก้ไขแล้ว
2
ม.ค. 24
2580
0
ส.ค. 23
2363
Not displaying the form and tree view แก้ไขแล้ว
5
ก.ย. 21
17667
3
ม.ค. 21
17073