-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from CristianoMafraJunior/16.0-mig-l10n_br_bas…
…e_allows_duplicate_cnpj_ie [16.0][MIG] l10n_br_base_allows_duplicate_cnpj_ie: Migration to 16.0
- Loading branch information
Showing
10 changed files
with
565 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,75 @@ | ||
=============================== | ||
Partners with duplicate CNPJ/IE | ||
=============================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:e6685702ada0dd1a4e4c11a213b2337b8f967aa66e61d3c781a6d2bb0d1216ec | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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-Engenere%2Fengenere--addons-lightgray.png?logo=github | ||
:target: https://github.com/Engenere/engenere-addons/tree/16.0/l10n_br_base_allows_duplicate_cnpj_ie | ||
:alt: Engenere/engenere-addons | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
Este módulo altera o comportamento da localização brasileira para | ||
permitir o cadastro de parceiros com CNPJ e Inscrição Estadual (IE) | ||
duplicados. | ||
|
||
Na configuração nativa, a localização permite registros com CNPJ | ||
duplicados apenas quando os parceiros possuem IEs diferentes, | ||
viabilizando essa duplicidade por meio de uma opção específica. Caso | ||
essa opção não esteja habilitada, a duplicidade de CNPJ é completamente | ||
bloqueada. | ||
|
||
Com este módulo, a verificação de duplicidade é desabilitada por | ||
completo, permitindo que registros com o mesmo CNPJ e IE sejam criados, | ||
independentemente da configuração nativa. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/Engenere/engenere-addons/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/Engenere/engenere-addons/issues/new?body=module:%20l10n_br_base_allows_duplicate_cnpj_ie%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 | ||
------- | ||
|
||
* Engenere | ||
|
||
Maintainers | ||
----------- | ||
|
||
.. |maintainer-felipemotter| image:: https://github.com/felipemotter.png?size=40px | ||
:target: https://github.com/felipemotter | ||
:alt: felipemotter | ||
|
||
Current maintainer: | ||
|
||
|maintainer-felipemotter| | ||
|
||
This module is part of the `Engenere/engenere-addons <https://github.com/Engenere/engenere-addons/tree/16.0/l10n_br_base_allows_duplicate_cnpj_ie>`_ project on GitHub. | ||
|
||
You are welcome to contribute. |
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,14 @@ | ||
# Copyright 2023 Engenere.one | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Partners with duplicate CNPJ/IE", | ||
"version": "16.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "Engenere", | ||
"maintainers": ["felipemotter"], | ||
"website": "https://github.com/Engenere/engenere-addons", | ||
"depends": [ | ||
"l10n_br_base", | ||
], | ||
} |
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 res_partner |
16 changes: 16 additions & 0 deletions
16
l10n_br_base_allows_duplicate_cnpj_ie/models/res_partner.py
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 2023 Engenere.one | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class Partner(models.Model): | ||
_inherit = "res.partner" | ||
|
||
@api.constrains("cnpj_cpf", "inscr_est") | ||
def _check_cnpj_inscr_est(self): | ||
""" | ||
Desativa o método original de validação de CNPJ/IE | ||
Permitir CNPJs e IEs duplicados | ||
""" | ||
return |
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,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
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,5 @@ | ||
Este módulo altera o comportamento da localização brasileira para permitir o cadastro de parceiros com CNPJ e Inscrição Estadual (IE) duplicados. | ||
|
||
Na configuração nativa, a localização permite registros com CNPJ duplicados apenas quando os parceiros possuem IEs diferentes, viabilizando essa duplicidade por meio de uma opção específica. Caso essa opção não esteja habilitada, a duplicidade de CNPJ é completamente bloqueada. | ||
|
||
Com este módulo, a verificação de duplicidade é desabilitada por completo, permitindo que registros com o mesmo CNPJ e IE sejam criados, independentemente da configuração nativa. |
Oops, something went wrong.