eh.dem has proposed merging lp:~savoirfairelinux-openerp/openerp-hr/language into lp:openerp-hr/6.1.
Requested reviews: HR Core Editors (hr-core-editors) For more details, see: https://code.launchpad.net/~savoirfairelinux-openerp/openerp-hr/language/+merge/194925 [ADD] add hr_language module.It adds a new menu in hr module.This module depends on hr module -- https://code.launchpad.net/~savoirfairelinux-openerp/openerp-hr/language/+merge/194925 Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-hr/language.
=== added directory 'hr_language' === added file 'hr_language/__init__.py' --- hr_language/__init__.py 1970-01-01 00:00:00 +0000 +++ hr_language/__init__.py 2013-11-12 19:48:26 +0000 @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). +# +# 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 . import hr_language +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'hr_language/__openerp__.py' --- hr_language/__openerp__.py 1970-01-01 00:00:00 +0000 +++ hr_language/__openerp__.py 2013-11-12 19:48:26 +0000 @@ -0,0 +1,39 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). +# +# 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": "Language Management", + "version": "0.1", + "author": "Savoir-faire Linux", + "category": "Human Resources", + "website": "http://www.savoirfairelinux.com", + "depends": ["hr"], + "description": """ +This module allows you to manage your employee languages. + """, + "update_xml": [ + "security/ir.model.access.csv", + "hr_language_view.xml", + ], + "active": False, + "installable": True +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'hr_language/hr_language.py' --- hr_language/hr_language.py 1970-01-01 00:00:00 +0000 +++ hr_language/hr_language.py 2013-11-12 19:48:26 +0000 @@ -0,0 +1,50 @@ +# -*- encoding: utf-8 -*- +############################################################################### +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). +# +# 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 tools +from osv import osv, fields + + +class hr_language(osv.osv): + _name = 'hr.language' + _columns = { + 'name': fields.selection(tools.scan_languages(), 'Language', required=True), + 'description': fields.char('Description', size=64, required=True, translate=True), + 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), + 'read': fields.boolean('Read'), + 'write': fields.boolean('Write'), + 'speak': fields.boolean('Speak'), + } + + _defaults = { + 'read': True, + 'write': True, + 'speak': True, + } +hr_language() + + +class hr_employee(osv.osv): + _inherit = 'hr.employee' + _columns = { + 'language_ids': fields.one2many('hr.language', 'employee_id', 'Languages'), + } +hr_employee() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: === added file 'hr_language/hr_language_view.xml' --- hr_language/hr_language_view.xml 1970-01-01 00:00:00 +0000 +++ hr_language/hr_language_view.xml 2013-11-12 19:48:26 +0000 @@ -0,0 +1,67 @@ +<openerp> + <data> + + <!-- Employee --> + + <record model="ir.ui.view" id="view_employee_form"> + <field name="name">hr.language.employee.form</field> + <field name="model">hr.employee</field> + <field name="inherit_id" ref="hr.view_employee_form"/> + <field name="type">form</field> + <field name="arch" type="xml"> + <notebook position="inside"> + <page string="Languages"> + <field name="language_ids" nolabel="1" colspan="4"/> + </page> + </notebook> + </field> + </record> + + <!-- Language --> + + <record model="ir.ui.view" id="view_language_tree"> + <field name="name">hr.language.tree</field> + <field name="model">hr.language</field> + <field name="type">tree</field> + <field name="arch" type="xml"> + <tree string="Languages"> + <field name="description"/> + <field name="read"/> + <field name="write"/> + <field name="speak"/> + </tree> + </field> + </record> + + <record model="ir.ui.view" id="view_language_form"> + <field name="name">hr.language.form</field> + <field name="model">hr.language</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Language"> + <field name="name"/> + <field name="description"/> + <field name="employee_id"/> + <newline/> + <field name="read"/> + <newline/> + <field name="write"/> + <newline/> + <field name="speak"/> + </form> + </field> + </record> + + <record model="ir.actions.act_window" id="open_view_language_form"> + <field name="res_model">hr.language</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem name="Languages" + parent="hr.menu_hr_configuration" + id="menu_open_view_language_form" + action="open_view_language_form"/> + + </data> +</openerp> === added directory 'hr_language/i18n' === added directory 'hr_language/security' === added file 'hr_language/security/ir.model.access.csv' --- hr_language/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 +++ hr_language/security/ir.model.access.csv 2013-11-12 19:48:26 +0000 @@ -0,0 +1,2 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_hr_language","hr.language","model_hr_language",base.group_hr_user,1,1,1,1
-- Mailing list: https://launchpad.net/~savoirfairelinux-openerp Post to : [email protected] Unsubscribe : https://launchpad.net/~savoirfairelinux-openerp More help : https://help.launchpad.net/ListHelp

