Skip to Content
Menú
This question has been flagged
1 Respondre
7546 Vistes

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
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
0
de maig 16
3149
1
de març 15
4087
0
de març 15
5645
1
de juny 24
1540
1
de febr. 24
1968