-
-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MIG] Migration module hr_language in 10.0 #380
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,21 @@ | ||
# -*- 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/>. | ||
# | ||
############################################################################### | ||
|
||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2017-Today: Odoo Community Association (OCA) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Language Management", | ||
"version": "8.0.0.1.0", | ||
"version": "10.0.0.1.0", | ||
"category": "Human Resources", | ||
"license": "AGPL-3", | ||
"author": "Savoir-faire Linux,Odoo Community Association (OCA)", | ||
"author": "Savoir-faire Linux, Acsone, Odoo Community Association (OCA)", | ||
"website": "http://www.savoirfairelinux.com", | ||
"depends": [ | ||
"hr", | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/hr_language_view.xml', | ||
'views/hr_employee.xml', | ||
'views/hr_language.xml', | ||
], | ||
"demo": [], | ||
"test": [], | ||
'installable': False, | ||
"auto_install": False, | ||
"images": [], | ||
'installable': True, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,15 @@ | |
# | ||
# Translators: | ||
# Yannick Vaucher <yannick.vaucher@camptocamp.com>, 2015 | ||
# François Honoré <francois.honore@acsone.eu>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: hr (8.0)\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2016-02-27 10:43+0000\n" | ||
"PO-Revision-Date: 2015-10-06 14:06+0000\n" | ||
"Last-Translator: Yannick Vaucher <yannick.vaucher@camptocamp.com>\n" | ||
"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" | ||
"PO-Revision-Date: 2017-10-10 08:00+0000\n" | ||
"Last-Translator: François Honoré <francois.honore@acsone.eu>\n" | ||
"Language-Team: French (http://www.transifex.com/oca/OCA-hr-10-0/language/fr/)\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
|
@@ -249,6 +250,11 @@ msgstr "Langue" | |
msgid "Languages" | ||
msgstr "Langues" | ||
|
||
#. module: hr_language | ||
#: help:hr.employee,language_ids:0 | ||
msgid "Languages of this employee" | ||
msgstr "Languages de cet employé" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Langues de cet employé". "Language" translates to "Langue" in french, as "Langage" (and not "Language") has a different meaning. So this should be fixed everythere in the french translation. |
||
|
||
#. module: hr_language | ||
#: selection:hr.language,name:0 | ||
msgid "Lao / ພາສາລາວ" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,5 @@ | ||
# -*- 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/>. | ||
# | ||
############################################################################### | ||
|
||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2017-Today: Odoo Community Association (OCA) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from . import hr_language | ||
from . import hr_employee |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2017-Today: Odoo Community Association (OCA) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import models, fields | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imports should be alphabetically sorted |
||
|
||
|
||
class HrEmployee(models.Model): | ||
_inherit = 'hr.employee' | ||
|
||
language_ids = fields.One2many( | ||
'hr.language', | ||
'employee_id', | ||
"Languages", | ||
help="Languages of this employee", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +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/>. | ||
# | ||
############################################################################### | ||
# -*- coding: utf-8 -*- | ||
# Copyright (C) 2017-Today: Odoo Community Association (OCA) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from odoo import models, fields, tools | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imports should be alphabetically sorted |
||
|
||
from openerp import tools | ||
from openerp import models, fields | ||
|
||
|
||
class hr_language(models.Model): | ||
class HrLanguage(models.Model): | ||
_name = 'hr.language' | ||
|
||
name = fields.Selection( | ||
tools.scan_languages(), | ||
string=u"Language", required=True) | ||
"Language", | ||
required=True, | ||
) | ||
description = fields.Char( | ||
string=u"Description", size=64, required=True) | ||
"Description", | ||
size=64, | ||
required=True, | ||
) | ||
employee_id = fields.Many2one( | ||
'hr.employee', string=u"Employee", required=True) | ||
can_read = fields.Boolean(u"Read", default=True, oldname='read') | ||
can_write = fields.Boolean(u"Write", default=True, oldname='write') | ||
can_speak = fields.Boolean(u"Speak", default=True, oldname='speak') | ||
|
||
|
||
class hr_employee(models.Model): | ||
_inherit = 'hr.employee' | ||
|
||
language_ids = fields.One2many( | ||
'hr.language', 'employee_id', u"Languages") | ||
'hr.employee', | ||
"Employee", | ||
required=True, | ||
) | ||
can_read = fields.Boolean( | ||
"Read", | ||
default=True, | ||
oldname='read', | ||
) | ||
can_write = fields.Boolean( | ||
"Write", | ||
default=True, | ||
oldname='write', | ||
) | ||
can_speak = fields.Boolean( | ||
"Speak", | ||
default=True, | ||
oldname='speak', | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | ||
"access_hr_language_base_user","hr.language_base_user","model_hr_language",base.group_user,1,0,0,0 | ||
"access_hr_language","hr.language","model_hr_language",base.group_hr_user,1,1,1,1 | ||
"access_hr_language","hr.language","model_hr_language",hr.group_hr_user,1,1,1,1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record model="ir.ui.view" id="hr_employee_form"> | ||
<field name="name">hr.employee.form (in hr_language)</field> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_form"/> | ||
<field name="arch" type="xml"> | ||
<notebook position="inside"> | ||
<page string="Languages" name="languages" groups="hr.group_hr_user"> | ||
<field name="language_ids" nolabel="1" colspan="4"> | ||
<tree string="Language" editable="bottom"> | ||
<field name="name"/> | ||
<field name="description"/> | ||
<field name="can_read"/> | ||
<field name="can_write"/> | ||
<field name="can_speak"/> | ||
</tree> | ||
</field> | ||
</page> | ||
</notebook> | ||
</field> | ||
</record> | ||
</odoo> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
demo is empty and could be removed.