Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
7514 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
kvě 16
3112
1
bře 15
4073
0
bře 15
5621
1
čvn 24
1533
1
úno 24
1961