Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
7541 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
mei 16
3141
1
mrt. 15
4086
0
mrt. 15
5638
1
jun. 24
1539
1
feb. 24
1965