I have a new model:
# -*- coding: utf-8 -*-
from openerp.osv import osv, fields
class test_branch(osv.osv):
_name = "test.branch"
_columns = { 'id': fields.char(string='ID'), 'name': fields.char(string='Name') }
Now when I make on another model an many2many relation to this:
class test_branch_rel(osv.osv):
_name = 'test.branch.rel'
_columns = { 'branch_left_id': fields.many2one('test.branch'),
'branch_right_id': fields.many2one('test.branch', 'Relationed Branch'), }
'test_branch': fields.many2many('test.branch', 'test_branch_rel', 'branch_left_id', 'branch_right_id'),
'test_zielbranch': fields.many2many('test.branch', 'test_branch_rel', 'branch_right_id', 'branch_left_id')
I can't save that many2many field:
I get this error:
integrity errors
[a reference object: test.branch - test.branch]