コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
7502 ビュー

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

アバター
破棄
最善の回答

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.

アバター
破棄
関連投稿 返信 ビュー 活動
0
5月 16
3106
1
3月 15
4057
0
3月 15
5611
1
6月 24
1530
1
2月 24
1957