0
機能フィールドとしてmany2many
フィールドを宣言する必要があります。私は以下のコードを試しましたが、データベースにリレーショナルテーブルを作成しません。many2many odooの関数フィールド8
def _get_function(self,cr,uid,ids,name,args,context=None):
resp={}
for data in self.browse(cr,uid,ids):
print'inside get Function'
return resp
'many2many_ids': fields.function(_get_function, method=True, relation="table.table1", obj='table1_table2_rel', type="many2many" , string="Many2Many")
データはフォームビューに保存されましたが、別の機能ではその値にアクセスできません。 like、
for data in self.browse(cr,uid,ids):
print'many2many_ids',data.many2many_ids
ここでは値は表示されません。
どうすればいいですか?
私が使用して店=私はエラーを取得して真:「/home/kabeer/git/liveAMS/openerp/models.pyを」ファイル、行2633、_auto_init cr.executeに TypeError: 'NoneType'オブジェクトには属性 '__getitem__'がありません。 '%1!' '%1!' – KbiR