Skip to content

Commit

Permalink
[MIG] l10n_it_fiscalcode: Migration to 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eLBati committed Oct 31, 2018
1 parent 5677812 commit ec7e899
Show file tree
Hide file tree
Showing 19 changed files with 558 additions and 113 deletions.
91 changes: 57 additions & 34 deletions l10n_it_fiscalcode/README.rst
Original file line number Diff line number Diff line change
@@ -1,73 +1,96 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==============
IT Fiscal Code
==============

This module extends the functionality of partner to fit italian laws and mores
and to allow you to computation Fiscal code computation for partner
==================================
Italian Localization - Fiscal Code
==================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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/12.0/l10n_it_fiscalcode
: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-12-0/l10n-italy-12-0-l10n_it_fiscalcode
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/122/12.0
:alt: Try me on Runbot

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

This module extends the functionality of partner to fit italian laws allowing you to compute Fiscal code for partners

**Table of contents**

.. contents::
:local:

Installation
============

To install this module, you need to:

Install Python Depends `codicefiscale <https://pypi.python.org/pypi/codicefiscale>`_.
Install python package `codicefiscale <https://pypi.python.org/pypi/codicefiscale>`_.

Usage
=====

To use this module, you need to:

#. Go to Partner and Run Wizard "Compute F.C."

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/122/10.0

Go to Partner and Run Wizard "Compute F.C."

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 smashing it by providing a detailed and welcomed feedback.
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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_fiscalcode%0Aversion:%2012.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
~~~~~~~

* Link IT s.r.l.
* Apulia Software
* Odoo Italia Network

Contributors
------------
~~~~~~~~~~~~

* Davide Corio <[email protected]>
* Davide Corio
* Luca Subiaco <[email protected]>
* Simone Orsi <[email protected]>
* Mario Riva <[email protected]>
* Mauro Soligo <[email protected]>
* Giovanni Barzan <[email protected]>
* Lorenzo Battistini <[email protected]>
* Roberto Onnis <[email protected]>
* Franco Tampieri <[email protected]>
* Franco Tampieri
* Andrea Cometa <[email protected]>
* Andrea Gallina <[email protected]>
* Andrea Gallina
* Matteo Bilotta <[email protected]>

Maintainers
~~~~~~~~~~~

Maintainer
----------
This module is maintained by the OCA.

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_fiscalcode>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 1 addition & 4 deletions l10n_it_fiscalcode/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Copyright 2014 Associazione Odoo Italia (<http://www.odoo-italia.org>)
# Copyright 2016 Andrea Gallina (Apulia Software)
# Copyright © 2018 Matteo Bilotta (Link IT s.r.l.)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import model
from . import wizard
11 changes: 6 additions & 5 deletions l10n_it_fiscalcode/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Copyright 2014 Associazione Odoo Italia (<http://www.odoo-italia.org>)
# Copyright 2016 Andrea Gallina (Apulia Software)
# Copyright © 2018 Matteo Bilotta (Link IT s.r.l.)
# Copyright 2018 Matteo Bilotta (Link IT s.r.l.)
# Copyright 2018 Lorenzo Battistini (https://github.com/eLBati)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

# noinspection PyStatementEffect
{
'name': 'Italian Localisation - Fiscal Code',
'version': '11.0.1.1.0',
'name': 'Italian Localization - Fiscal Code',
'version': '12.0.1.0.0',
'development_status': 'Production/Stable',
'category': 'Localisation/Italy',
'author': "Link IT s.r.l., "
"Apulia Software, "
"Odoo Italia Network, "
"Odoo Community Association (OCA)",
'website': 'https://odoo-community.org/',
'website': 'https://github.com/OCA/l10n-italy',
'license': 'AGPL-3',
'depends': ['base_vat'],
'external_dependencies': {
Expand Down
9 changes: 0 additions & 9 deletions l10n_it_fiscalcode/migrations/11.0.1.1.0/pre-migrate.py

This file was deleted.

5 changes: 1 addition & 4 deletions l10n_it_fiscalcode/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Copyright 2014 Associazione Odoo Italia (<http://www.odoo-italia.org>)
# Copyright 2016 Andrea Gallina (Apulia Software)
# Copyright © 2018 Matteo Bilotta (Link IT s.r.l.)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import res_partner
from . import res_city_it_code
7 changes: 3 additions & 4 deletions l10n_it_fiscalcode/model/res_city_it_code.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Copyright 2014 Associazione Odoo Italia (<http://www.odoo-italia.org>)
# Copyright 2016 Andrea Gallina (Apulia Software)
# Copyright © 2018 Matteo Bilotta (Link IT s.r.l.)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models, fields, tools

Expand Down Expand Up @@ -54,6 +51,7 @@ class ResCityItCode(models.Model):
- save as csv in data/res.city.it.code.csv
"""
_name = "res.city.it.code"
_description = "National city codes"

national_code = fields.Char('National code', size=4)
cadastre_code = fields.Char(
Expand All @@ -72,6 +70,7 @@ class ResCityItCode(models.Model):

class ResCityItCodeDistinct(models.Model):
_name = 'res.city.it.code.distinct'
_description = "National city codes distinct"
_auto = False

name = fields.Char('Name', size=100)
Expand Down
12 changes: 5 additions & 7 deletions l10n_it_fiscalcode/model/res_partner.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Copyright 2014 Associazione Odoo Italia (<http://www.odoo-italia.org>)
# Copyright 2016 Andrea Gallina (Apulia Software)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models, fields, api

Expand All @@ -13,16 +11,16 @@ def check_fiscalcode(self):
for partner in self:
if not partner.fiscalcode:
return True
elif len(partner.fiscalcode) != 16 and partner.individual:
elif (
len(partner.fiscalcode) != 16 and
partner.company_type == 'person'
):
return False
else:
return True

fiscalcode = fields.Char(
'Fiscal Code', size=16, help="Italian Fiscal Code")
individual = fields.Boolean(
'Individual', default=False,
help="If checked the C.F. is referred to a Individual Person")

_constraints = [
(check_fiscalcode,
Expand Down
12 changes: 12 additions & 0 deletions l10n_it_fiscalcode/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
* Davide Corio
* Luca Subiaco <[email protected]>
* Simone Orsi <[email protected]>
* Mario Riva <[email protected]>
* Mauro Soligo <[email protected]>
* Giovanni Barzan <[email protected]>
* Lorenzo Battistini <[email protected]>
* Roberto Onnis <[email protected]>
* Franco Tampieri
* Andrea Cometa <[email protected]>
* Andrea Gallina
* Matteo Bilotta <[email protected]>
1 change: 1 addition & 0 deletions l10n_it_fiscalcode/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module extends the functionality of partner to fit italian laws allowing you to compute Fiscal code for partners
1 change: 1 addition & 0 deletions l10n_it_fiscalcode/readme/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Install python package `codicefiscale <https://pypi.python.org/pypi/codicefiscale>`_.
1 change: 1 addition & 0 deletions l10n_it_fiscalcode/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Go to Partner and Run Wizard "Compute F.C."
Loading

0 comments on commit ec7e899

Please sign in to comment.