-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] hr_hide_info: Hide information for some users. (#97)
- Loading branch information
Showing
8 changed files
with
183 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
============ | ||
Hr hide info | ||
============ | ||
|
||
* Hide information for some users. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/hr-addons/issues>`_. In case of trouble, | ||
please check there if your issue has already been reported. If you spotted | ||
it first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
|
||
* Berezi Amubieta <[email protected]> | ||
* Alfredo de la Fuente <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2021 Berezi - Iker - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Hr hide info", | ||
'version': '14.0.1.0.0', | ||
"author": "Avanzosc", | ||
"category": "Sales/CRM", | ||
"depends": [ | ||
"hr" | ||
], | ||
"data": [ | ||
"views/hr_employee_views.xml" | ||
], | ||
"license": "AGPL-3", | ||
'installable': True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * hr_hide_info | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-06-23 08:06+0000\n" | ||
"PO-Revision-Date: 2021-06-23 08:06+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model,name:hr_hide_info.model_hr_employee | ||
msgid "Employee" | ||
msgstr "Empleado" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última modificación el" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.actions.act_window,name:hr_hide_info.open_view_my_file | ||
#: model:ir.ui.menu,name:hr_hide_info.menu_my_hr_employee | ||
msgid "My employee file" | ||
msgstr "Mi ficha de empleado" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__personal_private_email | ||
msgid "Personal private email" | ||
msgstr "Correo personal privado" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * hr_hide_info | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2021-06-23 08:05+0000\n" | ||
"PO-Revision-Date: 2021-06-23 08:05+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model,name:hr_hide_info.model_hr_employee | ||
msgid "Employee" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.actions.act_window,name:hr_hide_info.open_view_my_file | ||
#: model:ir.ui.menu,name:hr_hide_info.menu_my_hr_employee | ||
msgid "My employee file" | ||
msgstr "" | ||
|
||
#. module: hr_hide_info | ||
#: model:ir.model.fields,field_description:hr_hide_info.field_hr_employee__personal_private_email | ||
msgid "Personal private email" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import hr_employee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2021 Berezi - Iker - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
from odoo import models, fields | ||
|
||
|
||
class HrEmployee(models.Model): | ||
_inherit = 'hr.employee' | ||
|
||
personal_private_email = fields.Char(string='Personal private email') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<record id="view_employee_form" model="ir.ui.view"> | ||
<field name="model">hr.employee</field> | ||
<field name="inherit_id" ref="hr.view_employee_form"/> | ||
<field name="arch" type="xml"> | ||
<field name="private_email" position="after"> | ||
<field name="personal_private_email"/> | ||
</field> | ||
<page name="personal_information" position="attributes"> | ||
<attribute name="groups">hr.group_hr_manager</attribute> | ||
</page> | ||
<page name="hr_settings" position="attributes"> | ||
<attribute name="groups">hr.group_hr_manager</attribute> | ||
</page> | ||
</field> | ||
</record> | ||
|
||
<record id="open_view_my_file" model="ir.actions.act_window"> | ||
<field name="name">My employee file</field> | ||
<field name="type">ir.actions.act_window</field> | ||
<field name="view_mode">tree,form</field> | ||
<field name="res_model">hr.employee</field> | ||
<field name="view_id" ref="hr.view_employee_tree"/> | ||
<field name="domain">[('user_id', '=', uid)]</field> | ||
<field name="context">{}</field> | ||
</record> | ||
|
||
<menuitem id="menu_my_hr_employee" | ||
action="open_view_my_file" | ||
name="My employee file" | ||
parent="hr.menu_hr_employee_payroll" | ||
sequence="2"/> | ||
</odoo> |