From 9bc6ab5829d098bc2202b13f7037f34fcd576517 Mon Sep 17 00:00:00 2001 From: "aag (OpenERP)" Date: Fri, 20 May 2011 11:28:01 +0530 Subject: [PATCH] [IMP]Base:Remove Create Users cinfig wiz view and obj also bzr revid: aag@tinyerp.co.in-20110520055801-9gj7wmkni6pz3nh9 --- openerp/addons/base/base_update.xml | 62 ----------------------------- openerp/addons/base/res/res_user.py | 52 ------------------------ 2 files changed, 114 deletions(-) diff --git a/openerp/addons/base/base_update.xml b/openerp/addons/base/base_update.xml index 5dfd6f29fb8..0d9f12c2c09 100644 --- a/openerp/addons/base/base_update.xml +++ b/openerp/addons/base/base_update.xml @@ -247,68 +247,6 @@ - - res.config.users.confirm.form - res.config.users - form - - - -
- Create User -
- - New User - - - Create additional users and assign them groups that will allow them to have access to selected functionalities within the system. Click on 'Done' if you do not wish to add more users at this stage, you can always do this later. - - - - - - - - - - - - - - - - - action_add - Add User - gtk-add - - - - - action_next - Done - gtk-go-forward - -
-
-
- Configure Your Interface res.config.view diff --git a/openerp/addons/base/res/res_user.py b/openerp/addons/base/res/res_user.py index 261ec699659..db180ed6de6 100644 --- a/openerp/addons/base/res/res_user.py +++ b/openerp/addons/base/res/res_user.py @@ -508,58 +508,6 @@ class users(osv.osv): users() -class config_users(osv.osv_memory): - _name = 'res.config.users' - _inherit = ['res.users', 'res.config'] - - def _generate_signature(self, cr, name, email, context=None): - return _('--\n%(name)s %(email)s\n') % { - 'name': name or '', - 'email': email and ' <'+email+'>' or '', - } - - def create_user(self, cr, uid, new_id, context=None): - """ create a new res.user instance from the data stored - in the current res.config.users. - - If an email address was filled in for the user, sends a mail - composed of the return values of ``get_welcome_mail_subject`` - and ``get_welcome_mail_body`` (which should be unicode values), - with the user's data %-formatted into the mail body - """ - base_data = self.read(cr, uid, new_id, context=context) - partner_id = self.pool.get('res.partner').main_partner(cr, uid) - address = self.pool.get('res.partner.address').create( - cr, uid, {'name': base_data['name'], - 'email': base_data['email'], - 'partner_id': partner_id,}, - context) - user_data = dict( - base_data, - signature=self._generate_signature( - cr, base_data['name'], base_data['email'], context=context), - address_id=address, - ) - new_user = self.pool.get('res.users').create( - cr, uid, user_data, context) - self.send_welcome_email(cr, uid, new_user, context=context) - def execute(self, cr, uid, ids, context=None): - 'Do nothing on execution, just launch the next action/todo' - pass - def action_add(self, cr, uid, ids, context=None): - 'Create a user, and re-display the view' - self.create_user(cr, uid, ids[0], context=context) - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'res.config.users', - 'view_id':self.pool.get('ir.ui.view')\ - .search(cr,uid,[('name','=','res.config.users.confirm.form')]), - 'type': 'ir.actions.act_window', - 'target':'new', - } -config_users() - class groups2(osv.osv): ##FIXME: Is there a reason to inherit this object ? _inherit = 'res.groups' _columns = {