diff --git a/l10n_it_rea/README.rst b/l10n_it_rea/README.rst index 38961ea7e5b5..21954aeed1f1 100644 --- a/l10n_it_rea/README.rst +++ b/l10n_it_rea/README.rst @@ -1,54 +1,82 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License - ============ REA Register ============ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/10.0/l10n_it_rea + :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-10-0/l10n-italy-10-0-l10n_it_rea + :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/10.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + The module implement fields of REA data in partner -http://www.registroimprese.it/il-registro-imprese-e-altre-banche-dati#page=registro-imprese +http://www.registroimprese.it/ The module adds fields in page Accounting of partner form, where you can add data of registry of businesses -Usage -===== +REA fields are also available in company form and, filling them, Company Registry will be computed accordingly -.. 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 +**Table of contents** +.. contents:: + :local: Bug Tracker =========== -Bugs are tracked on `GitHub 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 `_. +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 `_. +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Agile Business Group +* Odoo Italia Network + Contributors ------------- +~~~~~~~~~~~~ -* Alessio Gerace +* Alessio Gerace * Nicola Malcontenti -* Lorenzo Battistini -* Andrea Gallina +* Lorenzo Battistini +* Andrea Gallina + +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 +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. \ No newline at end of file +This module is part of the `OCA/l10n-italy `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_rea/__init__.py b/l10n_it_rea/__init__.py index fa79568ae2ba..b44d765940f6 100644 --- a/l10n_it_rea/__init__.py +++ b/l10n_it_rea/__init__.py @@ -1,6 +1,4 @@ # -*- coding: utf-8 -*- -# Copyright 2014 Associazione Odoo Italia () -# Copyright 2015 Alessio Gerace -# Copyright 2016 Andrea Gallina (Apulia Software) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models diff --git a/l10n_it_rea/__manifest__.py b/l10n_it_rea/__manifest__.py index 1b6ad7b11b98..bd2f9adcb482 100644 --- a/l10n_it_rea/__manifest__.py +++ b/l10n_it_rea/__manifest__.py @@ -2,21 +2,24 @@ # Copyright 2014 Associazione Odoo Italia () # Copyright 2015 Alessio Gerace # Copyright 2016 Andrea Gallina (Apulia Software) +# Copyright 2018 Lorenzo Battistini +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { 'name': 'REA Register', - 'version': '10.0.1.0.0', + 'version': '10.0.1.1.0', 'category': 'Localisation/Italy', - 'summary': 'Manage fields for Economic Administrative catalogue', + 'summary': 'Manage fields for Economic Administrative catalogue', 'author': 'Agile Business Group, Odoo Italia Network,' 'Odoo Community Association (OCA)', - 'website': 'http://www.agilebg.com', + 'website': 'https://github.com/OCA/l10n-italy/', 'license': 'AGPL-3', "depends": [ 'account' ], "data": [ 'views/partner_view.xml', + 'views/company_view.xml', ], 'installable': True, } diff --git a/l10n_it_rea/i18n/it.po b/l10n_it_rea/i18n/it.po index 7dd31e285812..8ed49660a932 100644 --- a/l10n_it_rea/i18n/it.po +++ b/l10n_it_rea/i18n/it.po @@ -1,42 +1,52 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * l10n_it_rea +# * l10n_it_rea # -# Translators: -# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: l10n-italy (10.0)\n" +"Project-Id-Version: Odoo Server 10.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-12 02:39+0000\n" -"PO-Revision-Date: 2016-10-19 16:37+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-l10n-italy-10-0/" -"language/it/)\n" -"Language: it\n" +"POT-Creation-Date: 2018-10-16 13:02+0000\n" +"PO-Revision-Date: 2018-10-16 13:02+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: \n" #. module: l10n_it_rea +#: code:addons/l10n_it_rea/models/res_company.py:49 +#, python-format +msgid "%s %s Share Cap. %s%s %s %s" +msgstr "%s %s Cap. Soc. %s%s %s %s" + +#. module: l10n_it_rea +#: model:ir.model.fields,field_description:l10n_it_rea.field_res_company_rea_capital #: model:ir.model.fields,field_description:l10n_it_rea.field_res_partner_rea_capital #: model:ir.model.fields,field_description:l10n_it_rea.field_res_users_rea_capital msgid "Capital" msgstr "Capitale Sociale" +#. module: l10n_it_rea +#: model:ir.model,name:l10n_it_rea.model_res_company +msgid "Companies" +msgstr "Aziende" + #. module: l10n_it_rea #: selection:res.partner,rea_liquidation_state:0 msgid "In liquidation" msgstr "In liquidazione" #. module: l10n_it_rea +#: model:ir.model.fields,field_description:l10n_it_rea.field_res_company_rea_liquidation_state #: model:ir.model.fields,field_description:l10n_it_rea.field_res_partner_rea_liquidation_state #: model:ir.model.fields,field_description:l10n_it_rea.field_res_users_rea_liquidation_state msgid "Liquidation State" msgstr "Stato di liquidazione" #. module: l10n_it_rea +#: model:ir.model.fields,field_description:l10n_it_rea.field_res_company_rea_member_type #: model:ir.model.fields,field_description:l10n_it_rea.field_res_partner_rea_member_type #: model:ir.model.fields,field_description:l10n_it_rea.field_res_users_rea_member_type msgid "Member Type" @@ -53,6 +63,7 @@ msgid "Not in liquidation" msgstr "Non in liquidazione" #. module: l10n_it_rea +#: model:ir.model.fields,field_description:l10n_it_rea.field_res_company_rea_office #: model:ir.model.fields,field_description:l10n_it_rea.field_res_partner_rea_office #: model:ir.model.fields,field_description:l10n_it_rea.field_res_users_rea_office msgid "Office Province" @@ -64,6 +75,7 @@ msgid "Partner" msgstr "Partner" #. module: l10n_it_rea +#: model:ir.model.fields,field_description:l10n_it_rea.field_res_company_rea_code #: model:ir.model.fields,field_description:l10n_it_rea.field_res_partner_rea_code #: model:ir.model.fields,field_description:l10n_it_rea.field_res_users_rea_code msgid "REA Code" @@ -83,3 +95,4 @@ msgstr "Il codice REA รจ unico per ogni Azieda !" #: selection:res.partner,rea_member_type:0 msgid "Unique Member" msgstr "Socio unico" + diff --git a/l10n_it_rea/models/__init__.py b/l10n_it_rea/models/__init__.py index 90c9a81e8272..3f905ea72f87 100644 --- a/l10n_it_rea/models/__init__.py +++ b/l10n_it_rea/models/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2014 Associazione Odoo Italia () -# Copyright 2015 Alessio Gerace -# Copyright 2016 Andrea Gallina (Apulia Software) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import res_partner +from . import res_company diff --git a/l10n_it_rea/models/res_company.py b/l10n_it_rea/models/res_company.py new file mode 100644 index 000000000000..012d3bf72079 --- /dev/null +++ b/l10n_it_rea/models/res_company.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models, api, _ +from odoo.tools.misc import formatLang + + +class Company(models.Model): + _inherit = 'res.company' + + rea_office = fields.Many2one( + 'res.country.state', string='Office Province', + related='partner_id.rea_office') + rea_code = fields.Char('REA Code', size=20, related='partner_id.rea_code') + rea_capital = fields.Float('Capital', related='partner_id.rea_capital') + rea_member_type = fields.Selection( + [('SU', 'Unique Member'), + ('SM', 'Multiple Members')], 'Member Type', + related='partner_id.rea_member_type') + rea_liquidation_state = fields.Selection( + [('LS', 'In liquidation'), + ('LN', 'Not in liquidation')], 'Liquidation State', + related='partner_id.rea_liquidation_state') + company_registry = fields.Char( + "Company Registry", compute="_compute_company_registry", store=True) + + @api.depends( + "partner_id.rea_office", "partner_id.rea_code", + "partner_id.rea_capital", "partner_id.rea_member_type", + "partner_id.rea_liquidation_state" + ) + @api.multi + def _compute_company_registry(self): + for company in self: + rea_member_type = '' + if company.rea_member_type: + rea_member_type = dict( + self.env['res.partner']._fields[ + 'rea_member_type' + ]._description_selection(self.env) + )[company.rea_member_type] + rea_liquidation_state = '' + if company.rea_liquidation_state: + rea_liquidation_state = dict( + self.env['res.partner']._fields[ + 'rea_liquidation_state' + ]._description_selection(self.env) + )[company.rea_liquidation_state] + company_registry = _("%s %s Share Cap. %s%s %s %s") % ( + company.rea_office.code or '', company.rea_code or '', + company.currency_id.symbol, + formatLang(self.env, company.rea_capital), rea_member_type, + rea_liquidation_state + ) + company.company_registry = company_registry diff --git a/l10n_it_rea/models/res_partner.py b/l10n_it_rea/models/res_partner.py index 2fc75bf93b3a..f0162684ac1c 100644 --- a/l10n_it_rea/models/res_partner.py +++ b/l10n_it_rea/models/res_partner.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2014 Associazione Odoo Italia () -# Copyright 2015 Alessio Gerace -# Copyright 2016 Andrea Gallina (Apulia Software) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models diff --git a/l10n_it_rea/readme/CONTRIBUTORS.rst b/l10n_it_rea/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000000..d07e0dbaf86e --- /dev/null +++ b/l10n_it_rea/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Alessio Gerace +* Nicola Malcontenti +* Lorenzo Battistini +* Andrea Gallina diff --git a/l10n_it_rea/readme/DESCRIPTION.rst b/l10n_it_rea/readme/DESCRIPTION.rst new file mode 100644 index 000000000000..e789184c74c4 --- /dev/null +++ b/l10n_it_rea/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +The module implement fields of REA data in partner +http://www.registroimprese.it/ +The module adds fields in page Accounting of partner form, where you can +add data of registry of businesses + +REA fields are also available in company form and, filling them, Company Registry will be computed accordingly diff --git a/l10n_it_rea/static/description/index.html b/l10n_it_rea/static/description/index.html new file mode 100644 index 000000000000..586322dc8379 --- /dev/null +++ b/l10n_it_rea/static/description/index.html @@ -0,0 +1,427 @@ + + + + + + +REA Register + + + +
+

REA Register

+ + +

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

+

The module implement fields of REA data in partner +http://www.registroimprese.it/ +The module adds fields in page Accounting of partner form, where you can +add data of registry of businesses

+

REA fields are also available in company form and, filling them, Company Registry will be computed accordingly

+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Agile Business Group
  • +
  • Odoo Italia Network
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/l10n-italy project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_it_rea/views/company_view.xml b/l10n_it_rea/views/company_view.xml new file mode 100644 index 000000000000..9b80211ce7bc --- /dev/null +++ b/l10n_it_rea/views/company_view.xml @@ -0,0 +1,22 @@ + + + + + view_company_form_rea + res.company + + + + + + + + + + + 1 + + + + + diff --git a/l10n_it_rea/views/partner_view.xml b/l10n_it_rea/views/partner_view.xml index 1685580e2e5f..6d38fb70c90e 100644 --- a/l10n_it_rea/views/partner_view.xml +++ b/l10n_it_rea/views/partner_view.xml @@ -9,10 +9,10 @@ - - + +