From cb2137c5dad3d9fed94218cc4798bfcbff44f3f9 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Mon, 4 Apr 2011 11:05:35 +0200 Subject: [PATCH] add group to created menuitem, and bug fix in call to write() bzr revid: rco@openerp.com-20110404090535-o0gzcakbo7f7z4t7 --- addons/portal/portal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/portal/portal.py b/addons/portal/portal.py index fbf437a227d..a04f974743c 100644 --- a/addons/portal/portal.py +++ b/addons/portal/portal.py @@ -116,10 +116,11 @@ class portal(osv.osv): menu_values = { 'name': p.name + ' Menu', 'parent_id': menu_root, + 'groups_id': [(6, 0, [p.group_id.id])], } menu_id = menu_obj.create(cr, uid, menu_values, context) # set the parent_menu_id to item_id - self.write(cr, uid, p.id, {'parent_menu_id': menu_id}, context) + self.write(cr, uid, [p.id], {'parent_menu_id': menu_id}, context) return True