-
-
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
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 <amarroig@apsl.net> | ||
| * Miquel Alzanillas Monserrat <malzanillas@apsl.net> | ||
| * `PyTech <https://www.pytech.it>`_: | ||
|
|
||
| * Simone Rubino <simone.rubino@pytech.it> |
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
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.
Uh oh!
There was an error while loading. Please reload this page.