From 49e83f054b4d60d4fffbc691fbeab6a23bdf5b4f Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Thu, 31 Mar 2011 16:11:18 +0530 Subject: [PATCH 001/144] [FIX] survey: Fixed buildbot warning. bzr revid: uco@tinyerp.com-20110331104118-wpkebdiysq7u1gc6 --- addons/survey/wizard/survey_browse_answer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/survey/wizard/survey_browse_answer.py b/addons/survey/wizard/survey_browse_answer.py index b1bef814a86..2d740aa2655 100644 --- a/addons/survey/wizard/survey_browse_answer.py +++ b/addons/survey/wizard/survey_browse_answer.py @@ -21,7 +21,6 @@ from osv import osv from osv import fields -from tools.translate import _ class survey_browse_answer(osv.osv_memory): _name = 'survey.browse.answer' From 241d8ffbf2139a8779faf40a6ed56511e3746051 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Thu, 31 Mar 2011 16:15:02 +0530 Subject: [PATCH 002/144] [REF] survey: Refactored. bzr revid: uco@tinyerp.com-20110331104502-c2hdl8ldzgnpx38w --- addons/survey/wizard/survey_browse_answer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_browse_answer.py b/addons/survey/wizard/survey_browse_answer.py index 2d740aa2655..1798a7c418c 100644 --- a/addons/survey/wizard/survey_browse_answer.py +++ b/addons/survey/wizard/survey_browse_answer.py @@ -63,7 +63,7 @@ class survey_browse_answer(osv.osv_memory): record = self.read(cr, uid, ids, []) record = record and record[0] or {} if record['response_id']: - res_id = [(record['response_id'][0])] + res_id = [(record.get('response_id') and record['response_id'][0])] else: sur_response_obj = self.pool.get('survey.response') res_id = sur_response_obj.search(cr, uid, [('survey_id', '=',int(record['survey_id']))]) From 2582be64928631cc07a1e2701ea5f5c581074184 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Tue, 5 Apr 2011 12:17:12 +0200 Subject: [PATCH 003/144] add wizard to add/remove groups to portal users bzr revid: rco@openerp.com-20110405101712-nfednzpixzim86i4 --- addons/portal/__init__.py | 24 ++++++++++++++ addons/portal/__openerp__.py | 46 +++++++++++++++++++++++++++ addons/portal/portal_view.xml | 52 ++++++++++++++++++++++++++++++ addons/portal/wizard.py | 59 +++++++++++++++++++++++++++++++++++ addons/portal/wizard_view.xml | 51 ++++++++++++++++++++++++++++++ 5 files changed, 232 insertions(+) create mode 100644 addons/portal/__init__.py create mode 100644 addons/portal/__openerp__.py create mode 100644 addons/portal/portal_view.xml create mode 100644 addons/portal/wizard.py create mode 100644 addons/portal/wizard_view.xml diff --git a/addons/portal/__init__.py b/addons/portal/__init__.py new file mode 100644 index 00000000000..5aea1cf958f --- /dev/null +++ b/addons/portal/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2011 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import portal +import wizard + diff --git a/addons/portal/__openerp__.py b/addons/portal/__openerp__.py new file mode 100644 index 00000000000..012403a1a52 --- /dev/null +++ b/addons/portal/__openerp__.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2011 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + "name" : "Portal", + "version" : "0.2", + "depends" : ["base"], + "author" : "OpenERP SA", + "category": 'Tools', + "description": """ +This module defines 'portals' to customize the access to your OpenERP database +for external users. + +A portal defines customized user menu and access rights for a group of users +(the ones associated to that portal). It also associates user groups to the +portal users (adding a group in the portal automatically adds it to the portal +users, etc). That feature is very handy when used in combination with the +module 'share'. + """, + 'website': 'http://www.openerp.com', + 'demo_xml': [], + 'data': ['portal_view.xml', 'wizard_view.xml'], + 'installable': True, + 'certificate' : '', +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml new file mode 100644 index 00000000000..74872f61a67 --- /dev/null +++ b/addons/portal/portal_view.xml @@ -0,0 +1,52 @@ + + + + + + + + + Portals + res.portal + form + tree,form + +A portal helps defining specific views and rules for a group of users (the +portal group). A portal is associated to a menu; when changed, the portal menu +is assigned to the portal's users. Groups can be added to or removed from the +portal's users. + + + + + + + Portal Form + res.portal + form + + +
+ + + + + + + + + + + +