Maxime Chambreuil (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/openerp-hrms/6.1-move-module-to-openerp-hr into lp:openerp-hrms.
Requested reviews: Daniel Reis (dreis-pt) For more details, see: https://code.launchpad.net/~savoirfairelinux-openerp/openerp-hrms/6.1-move-module-to-openerp-hr/+merge/189393 -- https://code.launchpad.net/~savoirfairelinux-openerp/openerp-hrms/6.1-move-module-to-openerp-hr/+merge/189393 Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-hrms/6.1-move-module-to-openerp-hr.
=== removed directory 'hr_security_ext' === removed file 'hr_security_ext/__init__.py' --- hr_security_ext/__init__.py 2012-07-18 07:47:41 +0000 +++ hr_security_ext/__init__.py 1970-01-01 00:00:00 +0000 @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Daniel Reis -# 2012 -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - -import hr - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === removed file 'hr_security_ext/__openerp__.py' --- hr_security_ext/__openerp__.py 2012-07-18 07:47:41 +0000 +++ hr_security_ext/__openerp__.py 1970-01-01 00:00:00 +0000 @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Daniel Reis -# 2012 -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - - -{ - 'name': 'HR Groups and Security Extensions', - 'version': '6.1', - 'category': 'Human Resources', - 'description': """Additional roles and security enhancementes, as a base for more complex HR processes. - At HR Management level, there two roles provided bu standard: HR Manager and HR Office. - At the rest of the organization, three roles are available: - * Employee: each individual. Has only has read access to own employee data. - * Manager Assistant: has read and write access to all employees. - * Employee Manager: has read and write access to all employees. - - """, - 'author': 'Daniel Reis', - 'website': '[email protected]', - 'depends': [ - 'hr', - ], - 'init_xml': [], - 'update_xml': [ - 'hr_view.xml', - 'security/hr_security.xml', - 'security/ir.model.access.csv', - ], - 'demo_xml': [], - 'test': [], - 'installable': True, -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === removed file 'hr_security_ext/hr.py' --- hr_security_ext/hr.py 2012-07-18 07:47:41 +0000 +++ hr_security_ext/hr.py 1970-01-01 00:00:00 +0000 @@ -1,39 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Daniel Reis, 2011 -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - -from osv import fields, osv -import reis_base as util - - -class hr_employee(osv.osv): - _inherit = 'hr.employee' - _columns = { - 'code': fields.char('Internal code', size=16), - } - - def name_get(self, cr, uid, ids, context=None): - return util.ext_name_get(self, cr, uid, ids, '[%(code)s] %(name)s', ['code','name'], context=context) - - def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): - return util.ext_name_search(self, cr, user, name, args, operator, context=context, limit=limit, - keys=['code','name']) -hr_employee() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === removed file 'hr_security_ext/hr_view.xml' --- hr_security_ext/hr_view.xml 2012-07-18 07:47:41 +0000 +++ hr_security_ext/hr_view.xml 1970-01-01 00:00:00 +0000 @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data> - - <record id="view_employee_form_add_code" model="ir.ui.view"> - <field name="name">hr.employee.form</field> - <field name="model">hr.employee</field> - <field name="inherit_id" ref="hr.view_employee_form"/> - <field name="arch" type="xml"> - <field name="parent_id" position="after"> - <field name="code"/> - </field> - </field> - </record> - - </data> -</openerp> - - === removed file 'hr_security_ext/reis_base.py' --- hr_security_ext/reis_base.py 2012-07-18 07:47:41 +0000 +++ hr_security_ext/reis_base.py 1970-01-01 00:00:00 +0000 @@ -1,151 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Daniel Reis, 2011 -# -# 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 <http://www.gnu.org/licenses/>. -# -############################################################################## - -from osv import osv - -#---------------------------------------------------------- -#Extend the osv.osv name_get() method -#---------------------------------------------------------- -##Usage example: -## -##class hr_employee(osv.osv): -## _inherit = 'hr.employee' -## _rec_name_template = '[%(code)s] %(name)s' -## _rec_name_columns = ['code', 'name'] -## _rec_name_search = ['code', 'name', 'id'] -##hr_employee() -##---------------------------------------------------------- -#osv.osv._rec_name_template = '' -#osv.osv._rec_name_columns = [] -#osv.osv._rec_name_search = [] -# -#def new_name_get(self, cr, uid, ids, context=None): -# -# name_cols = self._rec_name_columns or [] -# name_templ = self._rec_name_template or '' -# #template and columns list must be provided -# if ids and name_templ and name_cols: -# res = [] -# for r in self.read(cr, uid, ids, ['id'] + name_cols): -# #remove False values -# for col in r: -# if not r[col]: -# r[col] = '' -# try: -# n = name_templ % r -# except: -# n = '<name_get failed!>' -# res.append( (r['id'], n) ) -# #rint '...name_get', name_templ, name_cols -# else: -# #if not, use the deafult name_get() -# res = super(osv.osv, self).name_get(cr, uid, ids, context=context) -# return res -#osv.osv.name_get = new_name_get -# -# -#def new_name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): -# limit = limit or 100 -# ids = [] -# print 'name_search', self._rec_name_search, args, operator, name -# if name and self._rec_name_search: -# for key in self._rec_name_search: -# ids = self.search(cr, user, [(key, operator, name)]+ args, limit=limit, context=context) -# #Exit loop on first results -# if len(ids): -# break -# print '...name_search:', self._name, self._rec_name_search, len(ids), limit -# #rint len(ids), limit -# else: -# ids = self.search(cr, user, args, limit=limit, context=context) -# print '...got', ids -# result = self.name_get(cr, user, ids, context=context) -# return result -#osv.osv.name_search = new_name_search - - - - -def ext_name_get(self, cr, uid, ids, name_templ, flds_templ, context=None): -#Usage: -#import reis_base as util -#(...) -# def name_get(self, cr, uid, ids, context=None): -# return util.ext_name_get(self, cr, uid, ids, '[%(ref)s] %(name)s', ['ref', 'name'], context=context) -# #<= edit name template mask -# - name_templ = name_templ or '%(' + self._rec_name + ')s' - #template and columns list must be provided - if ids and name_templ: - ##Get fields list, if not provided (warning: slower!) - ##Exclude function fields to avoid recursion - #if not flds_templ: - # flds_all = self.fields_get(cr, uid) - # flds_templ = [ x for x in flds_all if x!='id' and not flds_all[x].get('function')] - res = [] - for rec in self.read(cr, uid, ids, ['id']+flds_templ, context=context): - #Prepare values - for key in rec: - #Set default for empty values - if not rec[key]: - rec[key] = '' - #Extract names from tuples (id, name) in many2one fields - if type(rec[key]) == tuple: - rec[key] = rec[key][1] - try: - n = name_templ % rec - except: - n = '<name_get failed!>' - res.append( (rec['id'], n) ) - #rint '...name_get', name_templ, rec - else: - #if not, use the deafult name_get() - res = super(osv.osv, self).name_get(cr, uid, ids, context=context) - return res - - -def ext_name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100, keys=None): -#Usage: -#import reis_base as util -#(...) -# def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): -# return util.ext_name_search(self, cr, user, name, args, operator, context=context, limit=limit, -# keys=['ref','name']) #<=edit list of fields to search -# - if not args: - args = [] - if not keys: - keys = [name] - #rint 'name_search', keys, args, operator, name.encode('utf-8') - if name: - for key in keys: - ids = self.search(cr, user, [(key, operator, name)]+ args, limit=limit, context=context) - #Exit loop on first results - if len(ids): break - #rint '...key ', key, ids - else: - ids = self.search(cr, user, args, limit=limit, context=context) - #rint '...nokey:', ids - result = self.name_get(cr, user, ids, context=context) - return result - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - - === removed directory 'hr_security_ext/security' === removed file 'hr_security_ext/security/hr_security.xml' --- hr_security_ext/security/hr_security.xml 2012-07-18 07:47:41 +0000 +++ hr_security_ext/security/hr_security.xml 1970-01-01 00:00:00 +0000 @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<openerp> - <data noupdate="1"> - - <record model="res.groups" id="hr.group_user_assistant"> - <field name="name">Employee Manager Assistant</field> - <field name="comment">Assists the manager. Can view, edit but not decide on employees.</field> - <field name="category_id" ref="base.module_category_human_resources"/> - <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/> - </record> - - <record model="res.groups" id="hr.group_user_manager"> - <field name="name">Employee Manager</field> - <field name="comment">Can view, edit and decide on employees.</field> - <field name="category_id" ref="base.module_category_human_resources"/> - <field name="implied_ids" eval="[(4, ref('group_user_assistant'))]"/> - </record> -<!-- - <record id="hr_employee_manager_rule" model="ir.rule"> - <field name="name">Manager's employees rule</field> - <field model="ir.model" name="model_id" ref="hr.model_hr_employee"/> - <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> - </record> ---> - </data> -</openerp> - - - - === removed file 'hr_security_ext/security/ir.model.access.csv' --- hr_security_ext/security/ir.model.access.csv 2012-07-18 07:47:41 +0000 +++ hr_security_ext/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-- Mailing list: https://launchpad.net/~savoirfairelinux-openerp Post to : [email protected] Unsubscribe : https://launchpad.net/~savoirfairelinux-openerp More help : https://help.launchpad.net/ListHelp

