-
-
Notifications
You must be signed in to change notification settings - Fork 164
[IMP] hr_payroll_document: Optional payroll encryption #245
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
Merged
OCA-git-bot
merged 1 commit into
OCA:16.0
from
PyTech-SRL:16.0-imp-hr_payroll_document-optional_encryption
Jan 5, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -30,6 +30,9 @@ HR - Payroll Document | |
|
|
||
| This module have a wizard view to manage the different payrolls of employees which is identified by the identification_id attribute. | ||
|
|
||
| By default, the employee's payroll is encrypted using their identification number. | ||
| This behavior can be changed by the employee in their profile or by HR in the employee's form. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
|
|
@@ -58,6 +61,9 @@ Contributors | |
|
|
||
| * Antoni Marroig Campomar <[email protected]> | ||
| * Miquel Alzanillas Monserrat <[email protected]> | ||
| * `PyTech <https://www.pytech.it>`_: | ||
|
|
||
| * Simone Rubino <[email protected]> | ||
|
|
||
| Maintainers | ||
| ~~~~~~~~~~~ | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| from . import ir_attachment_payroll_custom | ||
| from . import ir_attachment | ||
| from . import hr_employee | ||
| from . import res_users |
This file contains hidden or 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
This file contains hidden or 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,18 @@ | ||
| # Copyright 2025 Simone Rubino - PyTech | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from odoo import fields, models | ||
|
|
||
| from odoo.addons.hr.models.res_users import HR_WRITABLE_FIELDS | ||
|
|
||
| HR_WRITABLE_FIELDS.append("no_payroll_encryption") | ||
|
|
||
|
|
||
| class ResUsers(models.Model): | ||
| _inherit = "res.users" | ||
|
|
||
| no_payroll_encryption = fields.Boolean( | ||
| related="employee_id.no_payroll_encryption", | ||
| readonly=False, | ||
| related_sudo=False, | ||
| ) |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| * Antoni Marroig Campomar <[email protected]> | ||
| * Miquel Alzanillas Monserrat <[email protected]> | ||
| * `PyTech <https://www.pytech.it>`_: | ||
|
|
||
| * Simone Rubino <[email protected]> |
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1,4 @@ | ||
| This module have a wizard view to manage the different payrolls of employees which is identified by the identification_id attribute. | ||
|
|
||
| By default, the employee's payroll is encrypted using their identification number. | ||
| This behavior can be changed by the employee in their profile or by HR in the employee's form. |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
| <head> | ||
|
|
@@ -9,10 +8,11 @@ | |
|
|
||
| /* | ||
| :Author: David Goodger ([email protected]) | ||
| :Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ | ||
| :Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ | ||
| :Copyright: This stylesheet has been placed in the public domain. | ||
|
|
||
| Default cascading style sheet for the HTML output of Docutils. | ||
| Despite the name, some widely supported CSS2 features are used. | ||
|
|
||
| See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to | ||
| customize this style sheet. | ||
|
|
@@ -275,7 +275,7 @@ | |
| margin-left: 2em ; | ||
| margin-right: 2em } | ||
|
|
||
| pre.code .ln { color: grey; } /* line numbers */ | ||
| pre.code .ln { color: gray; } /* line numbers */ | ||
| pre.code, code { background-color: #eeeeee } | ||
| pre.code .comment, code .comment { color: #5C6576 } | ||
| pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } | ||
|
|
@@ -301,7 +301,7 @@ | |
| span.pre { | ||
| white-space: pre } | ||
|
|
||
| span.problematic { | ||
| span.problematic, pre.problematic { | ||
| color: red } | ||
|
|
||
| span.section-subtitle { | ||
|
|
@@ -371,6 +371,8 @@ <h1 class="title">HR - Payroll Document</h1> | |
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> | ||
| <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/payroll/tree/16.0/hr_payroll_document"><img alt="OCA/payroll" src="https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/payroll-16-0/payroll-16-0-hr_payroll_document"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p> | ||
| <p>This module have a wizard view to manage the different payrolls of employees which is identified by the identification_id attribute.</p> | ||
| <p>By default, the employee’s payroll is encrypted using their identification number. | ||
| This behavior can be changed by the employee in their profile or by HR in the employee’s form.</p> | ||
| <p><strong>Table of contents</strong></p> | ||
| <div class="contents local topic" id="contents"> | ||
| <ul class="simple"> | ||
|
|
@@ -404,12 +406,18 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2> | |
| <ul class="simple"> | ||
| <li>Antoni Marroig Campomar <<a class="reference external" href="mailto:amarroig@apsl.net">amarroig@apsl.net</a>></li> | ||
| <li>Miquel Alzanillas Monserrat <<a class="reference external" href="mailto:malzanillas@apsl.net">malzanillas@apsl.net</a>></li> | ||
| <li><a class="reference external" href="https://www.pytech.it">PyTech</a>:<ul> | ||
| <li>Simone Rubino <<a class="reference external" href="mailto:simone.rubino@pytech.it">simone.rubino@pytech.it</a>></li> | ||
| </ul> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| <div class="section" id="maintainers"> | ||
| <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2> | ||
| <p>This module is maintained by the OCA.</p> | ||
| <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> | ||
| <a class="reference external image-reference" href="https://odoo-community.org"> | ||
| <img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /> | ||
| </a> | ||
| <p>OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use.</p> | ||
|
|
||
This file contains hidden or 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
This file contains hidden or 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,20 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <!-- | ||
| ~ Copyright 2025 Simone Rubino - PyTech | ||
| ~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
| --> | ||
| <odoo> | ||
| <record id="view_employee_form" 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"> | ||
| <group name="payroll_group" position="attributes"> | ||
| <attribute name="invisible" /> | ||
| </group> | ||
| <group name="payroll_group" position="inside"> | ||
| <field name="no_payroll_encryption" string="Disable encryption" /> | ||
| </group> | ||
| </field> | ||
| </record> | ||
| </odoo> |
This file contains hidden or 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,27 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <!-- | ||
| ~ Copyright 2025 Simone Rubino - PyTech | ||
| ~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
| --> | ||
| <odoo> | ||
| <record id="res_users_view_form_profile" model="ir.ui.view"> | ||
| <field name="name">Add Payroll fields to User profile form view</field> | ||
| <field name="model">res.users</field> | ||
| <field name="inherit_id" ref="hr.res_users_view_form_profile" /> | ||
| <field name="arch" type="xml"> | ||
| <div id="o_work_employee_main" position="inside"> | ||
| <group name="payroll" string="Payroll"> | ||
| <field | ||
| name="no_payroll_encryption" | ||
| string="Disable encryption" | ||
| attrs="{ | ||
| 'readonly': [ | ||
| ('can_edit', '=', False), | ||
| ], | ||
| }" | ||
| /> | ||
| </group> | ||
| </div> | ||
| </field> | ||
| </record> | ||
| </odoo> |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
By default please encrypt de document
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.
Hi, yes I had the same thought, that's why the
Booleanis "Do not encrypt the document": by defaultBooleans areFalse, so the document is encrypted.