From 779f68061f080d9fbe54af43de3dccfa83367ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 7 Feb 2012 23:44:33 +0100 Subject: [PATCH] Fix convertion of many2many values Many2Many fields are receive by the wizard as a list of dictionary. --- company.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/company.py b/company.py index 52a90fa620..d7ca62fee1 100644 --- a/company.py +++ b/company.py @@ -309,7 +309,7 @@ class CompanyConfig(Wizard): if field._type == 'one2many': values[fname] = [('create', v) for v in values[fname]] elif field._type == 'many2many': - values[fname] = [('set', values[fname])] + values[fname] = [('set', [v['id'] for v in values[fname]])] company_id = company_obj.create(values) user_ids = user_obj.search([ ('main_company', '=', False),