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

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

Avatar
Buang
Jawaban Terbai

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.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mei 16
3283
1
Mar 15
4295
0
Mar 15
5755
1
Jun 24
1712
1
Feb 24
2178