Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions l10n_it_hr_payroll_document/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
======================
ITA - Invio buste paga
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f952dd0712efdc1447037f31a4a8f7d7550ceb96da26d9cbed50c79864a9376b
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github
:target: https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_hr_payroll_document
:alt: OCA/l10n-italy
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/l10n-italy-16-0/l10n-italy-16-0-l10n_it_hr_payroll_document
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-italy&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Adapt the Payroll Management to the Italian localization:

- The employees are identified by their Fiscal Code.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_hr_payroll_document%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* PyTech

Contributors
------------

- `PyTech <https://www.pytech.it>`__:

- Simone Rubino <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-SirPyTech| image:: https://github.com/SirPyTech.png?size=40px
:target: https://github.com/SirPyTech
:alt: SirPyTech

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-SirPyTech|

This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/16.0/l10n_it_hr_payroll_document>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions l10n_it_hr_payroll_document/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
18 changes: 18 additions & 0 deletions l10n_it_hr_payroll_document/__manifest__.py
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).
{
"name": "ITA - Invio buste paga",
"summary": "Spacchetta e invia agli impiegati le buste paga.",
"version": "16.0.1.0.0",
"category": "Payrolls",
"website": "https://github.com/OCA/l10n-italy",
"author": "PyTech, Odoo Community Association (OCA)",
"maintainers": [
"SirPyTech",
],
"license": "AGPL-3",
"depends": [
"hr_payroll_document",
"l10n_it_fiscalcode",
],
}
3 changes: 3 additions & 0 deletions l10n_it_hr_payroll_document/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import hr_employee
28 changes: 28 additions & 0 deletions l10n_it_hr_payroll_document/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2025 Simone Rubino - PyTech
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from codicefiscale import isvalid as is_fiscalcode_valid

from odoo import models


class Employee(models.Model):
_inherit = "hr.employee"

def _l10n_it_validate_payroll_identification(self, code=None):
if code is None and len(self) == 1:
code = self.identification_id

# The Employee ID in an italian Company is the Fiscal Code
if code:
is_valid = is_fiscalcode_valid(code)
else:
is_valid = True
return is_valid

def _validate_payroll_identification(self, code=None):
if self.env.company.country_id.code == "IT":
is_valid = self._l10n_it_validate_payroll_identification(code=code)
else:
is_valid = super()._validate_payroll_identification(code=code)
return is_valid
3 changes: 3 additions & 0 deletions l10n_it_hr_payroll_document/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions l10n_it_hr_payroll_document/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [PyTech](https://www.pytech.it):
- Simone Rubino \<<[email protected]>\>
3 changes: 3 additions & 0 deletions l10n_it_hr_payroll_document/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Adapt the Payroll Management to the Italian localization:

- The employees are identified by their Fiscal Code.
Loading