Hi,
I am trying to add some records from a many2many on a wizard to a many2many on a record, but with no success.
I had done a wizard with all the model views on it, where there is one like
class AddUsersStart(ModelView):
'Add User Start'
__name__ = 'add.users.start'
(...)
users = fields.Many2Many('res.user',None,None,'Users')
(...)
class AddUserWizard(Wizard):
'Add User Wizard'
__name__ = 'add.users.wizard'
(...)
def do_add_users(self, action):
pool = Pool()
MyClass = pool.get('mymodel.myclass')
(...)
myclass = {
(...)
'users': self.start.users
}
MyClass.create([myclass])
(...)
Where the ‘users’ = fields.Many2Many(‘res.user’,‘myclass’,‘user’,‘Users’).
I tried to do it like the [(‘create’,[{ ‘users’: …,}])] on a One2Many, but no success.
Any help would be appreciated. Thanks!
Francisco