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

Hi,

i created a mny to many:

'id_many' : fields.many2many('test.training.student','test_training_rel','truc_name','machin_name','bidule')

But how i can acces to modify the relation table test_training_rel ?

I try:

print self.pool.get('hr.employee')        ====> works !
print self.pool.get('test.training.rel')  ====> None  #   :'(
print self.pool.get('test_training_rel')  ====> None  #   :'(

In OpenERP v6

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

hr.employee is a model not table. To access the relation table and its content you need to execute sql query inside your function and map the fetched data accordingly.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
พ.ค. 16
3196
1
มี.ค. 15
4138
0
มี.ค. 15
5674
1
มิ.ย. 24
1549
1
ก.พ. 24
2008