Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
7579 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
mai. 16
3200
1
mar. 15
4139
0
mar. 15
5678
1
jun. 24
1554
1
fev. 24
2013