-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] l10n_it_fiscalcode: Configurable uniqueness constraint
- Loading branch information
1 parent
e095f39
commit 4e31bba
Showing
10 changed files
with
304 additions
and
22 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
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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import res_config_settings | ||
from . import res_partner | ||
from . import res_city_it_code | ||
from . import res_company |
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
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,17 @@ | ||
# Copyright 2024 Simone Rubino - Aion Tech | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class ResConfigSettings(models.TransientModel): | ||
_inherit = "res.config.settings" | ||
|
||
l10n_it_fiscalcode_check_uniqueness = fields.Boolean( | ||
related="company_id.l10n_it_fiscalcode_check_uniqueness", | ||
readonly=False, | ||
) | ||
|
||
def l10n_it_fiscalcode_check_uniqueness_constraint(self): | ||
"""Check the fiscal code of all the partners in current company.""" | ||
self.company_id.l10n_it_fiscalcode_check_uniqueness_constraint() | ||
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
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,7 @@ | ||
**Italiano** | ||
|
||
Per controllare che i codici fiscali siano unici in una stessa azienda, abilitare "Il codice fiscale è unico" in Fatturazione > Configurazione > Impostazioni. | ||
|
||
**English** | ||
|
||
In order to check that fiscal codes are unique within the same company, enable "Tax code is unique" in Invoicing > Configuration > Settings. |
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 |
---|---|---|
|
@@ -8,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. | ||
|
@@ -274,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 } | ||
|
@@ -300,7 +301,7 @@ | |
span.pre { | ||
white-space: pre } | ||
|
||
span.problematic { | ||
span.problematic, pre.problematic { | ||
color: red } | ||
|
||
span.section-subtitle { | ||
|
@@ -379,17 +380,18 @@ <h1 class="title">ITA - Codice fiscale</h1> | |
<div class="contents local topic" id="contents"> | ||
<ul class="simple"> | ||
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li> | ||
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a></li> | ||
<li><a class="reference internal" href="#changelog" id="toc-entry-3">Changelog</a><ul> | ||
<li><a class="reference internal" href="#section-1" id="toc-entry-4">16.0.1.0.0 (2022-11-11)</a></li> | ||
<li><a class="reference internal" href="#section-2" id="toc-entry-5">16.0.1.0.1 (2022-11-16)</a></li> | ||
<li><a class="reference internal" href="#configuration" id="toc-entry-2">Configuration</a></li> | ||
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a></li> | ||
<li><a class="reference internal" href="#changelog" id="toc-entry-4">Changelog</a><ul> | ||
<li><a class="reference internal" href="#section-1" id="toc-entry-5">16.0.1.0.0 (2022-11-11)</a></li> | ||
<li><a class="reference internal" href="#section-2" id="toc-entry-6">16.0.1.0.1 (2022-11-16)</a></li> | ||
</ul> | ||
</li> | ||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-6">Bug Tracker</a></li> | ||
<li><a class="reference internal" href="#credits" id="toc-entry-7">Credits</a><ul> | ||
<li><a class="reference internal" href="#authors" id="toc-entry-8">Authors</a></li> | ||
<li><a class="reference internal" href="#contributors" id="toc-entry-9">Contributors</a></li> | ||
<li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li> | ||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-7">Bug Tracker</a></li> | ||
<li><a class="reference internal" href="#credits" id="toc-entry-8">Credits</a><ul> | ||
<li><a class="reference internal" href="#authors" id="toc-entry-9">Authors</a></li> | ||
<li><a class="reference internal" href="#contributors" id="toc-entry-10">Contributors</a></li> | ||
<li><a class="reference internal" href="#maintainers" id="toc-entry-11">Maintainers</a></li> | ||
</ul> | ||
</li> | ||
</ul> | ||
|
@@ -403,8 +405,18 @@ <h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1> | |
<p>Install the Python package: | ||
<a class="reference external" href="https://pypi.python.org/pypi/codicefiscale">codicefiscale</a>.</p> | ||
</div> | ||
<div class="section" id="configuration"> | ||
<h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1> | ||
<p><strong>Italiano</strong></p> | ||
<p>Per controllare che i codici fiscali siano unici in una stessa azienda, | ||
abilitare “Il codice fiscale è unico” in Fatturazione > Configurazione > | ||
Impostazioni.</p> | ||
<p><strong>English</strong></p> | ||
<p>In order to check that fiscal codes are unique within the same company, | ||
enable “Tax code is unique” in Invoicing > Configuration > Settings.</p> | ||
</div> | ||
<div class="section" id="usage"> | ||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> | ||
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1> | ||
<p><strong>Italiano</strong></p> | ||
<p>Sulla scheda del partner fare clic sul pulsante <em>Calcola CF</em> per aprire | ||
la procedura guidata relativa al calcolo del codice fiscale.</p> | ||
|
@@ -413,7 +425,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1> | |
to the fiscal code computation.</p> | ||
</div> | ||
<div class="section" id="changelog"> | ||
<h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1> | ||
<h1><a class="toc-backref" href="#toc-entry-4">Changelog</a></h1> | ||
<div class="line-block"> | ||
<div class="line">[ The change log. The goal of this file is to help readers</div> | ||
<div class="line">understand changes between version. The primary audience is end users | ||
|
@@ -425,39 +437,39 @@ <h1><a class="toc-backref" href="#toc-entry-3">Changelog</a></h1> | |
break the structure of the README.rst or other documents where this | ||
fragment is included. ]</p> | ||
<div class="section" id="section-1"> | ||
<h2><a class="toc-backref" href="#toc-entry-4">16.0.1.0.0 (2022-11-11)</a></h2> | ||
<h2><a class="toc-backref" href="#toc-entry-5">16.0.1.0.0 (2022-11-11)</a></h2> | ||
<ul class="simple"> | ||
<li>[MIG] Migration from Odoo 14.0 to 16.0</li> | ||
<li>[IMP] Black, isort, prettier (pre-commit)</li> | ||
</ul> | ||
</div> | ||
<div class="section" id="section-2"> | ||
<h2><a class="toc-backref" href="#toc-entry-5">16.0.1.0.1 (2022-11-16)</a></h2> | ||
<h2><a class="toc-backref" href="#toc-entry-6">16.0.1.0.1 (2022-11-16)</a></h2> | ||
<ul class="simple"> | ||
<li>[IMP] Add codicefiscale.isvalid() to improve fiscalcode validation</li> | ||
</ul> | ||
</div> | ||
</div> | ||
<div class="section" id="bug-tracker"> | ||
<h1><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h1> | ||
<h1><a class="toc-backref" href="#toc-entry-7">Bug Tracker</a></h1> | ||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>. | ||
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 | ||
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fiscalcode%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> | ||
<p>Do not contact contributors directly about support or help with technical issues.</p> | ||
</div> | ||
<div class="section" id="credits"> | ||
<h1><a class="toc-backref" href="#toc-entry-7">Credits</a></h1> | ||
<h1><a class="toc-backref" href="#toc-entry-8">Credits</a></h1> | ||
<div class="section" id="authors"> | ||
<h2><a class="toc-backref" href="#toc-entry-8">Authors</a></h2> | ||
<h2><a class="toc-backref" href="#toc-entry-9">Authors</a></h2> | ||
<ul class="simple"> | ||
<li>Link IT s.r.l.</li> | ||
<li>Apulia Software</li> | ||
<li>Odoo Italia Network</li> | ||
</ul> | ||
</div> | ||
<div class="section" id="contributors"> | ||
<h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2> | ||
<h2><a class="toc-backref" href="#toc-entry-10">Contributors</a></h2> | ||
<ul class="simple"> | ||
<li>Davide Corio</li> | ||
<li>Luca Subiaco <<a class="reference external" href="mailto:subluca@gmail.com">subluca@gmail.com</a>></li> | ||
|
@@ -482,9 +494,11 @@ <h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2> | |
</ul> | ||
</div> | ||
<div class="section" id="maintainers"> | ||
<h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2> | ||
<h2><a class="toc-backref" href="#toc-entry-11">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 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
Oops, something went wrong.