62
62
vals['menu_action_id']= self.create_action_menu(cr,user,vals['menu_id'], vals['name'],context)
63
63
return super(portal_portal, self).create(cr, user, vals, context)
65
def create_menu(self, cr, uid,portal_id, portal_model_id, menu_name, action_id,parent_menu_id=None,view_ids=None,view_type=False,context=None):
65
def create_menu(self, cr, uid,portal_id, portal_model_id, menu_name, action_id,parent_menu_id=None,context=None):
67
67
Create a menuitem for the given portal and model whith the given name and action.
70
70
assert portal_id and portal_model_id and menu_name and action_id, "Create_menu does not accept null values"
80
72
portal= self.pool.get('portal.portal').browse(cr,uid,portal_id)
81
73
model= self.pool.get('portal.model').browse(cr,uid,portal_model_id)
82
74
action= self.pool.get('ir.actions.act_window').browse(cr,uid,action_id)