diff --git a/account_fiscal_year/README.rst b/account_fiscal_year/README.rst new file mode 100644 index 00000000000..6d1e98bfa0d --- /dev/null +++ b/account_fiscal_year/README.rst @@ -0,0 +1,97 @@ +=================== +Account Fiscal Year +=================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Faccount--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/16.0/account_fiscal_year + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_fiscal_year + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/92/16.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to create and edit fiscal years from the menu: + +Invoicing > Configuration > Accounting > Fiscal Years + +**Table of contents** + +.. contents:: + :local: + +Known issues / Roadmap +====================== + +The account.fiscal.year model definition and views come from the core of Odoo v13 community because in v14, account.fiscal.year has been moved to Odoo enterprise. + +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 +* Camptocamp SA + +Contributors +~~~~~~~~~~~~ + +* Damien Crier +* Laurent Mignon +* Lorenzo Battistini +* Andrea Stirpe +* Simone Rubino + +* `Pesol `__: + + * Pedro Evaristo Gonzalez Sanchez + +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-eLBati| image:: https://github.com/eLBati.png?size=40px + :target: https://github.com/eLBati + :alt: eLBati + +Current `maintainer `__: + +|maintainer-eLBati| + +This module is part of the `OCA/account-financial-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_fiscal_year/__init__.py b/account_fiscal_year/__init__.py new file mode 100644 index 00000000000..2bc1433e720 --- /dev/null +++ b/account_fiscal_year/__init__.py @@ -0,0 +1,3 @@ +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/account_fiscal_year/__manifest__.py b/account_fiscal_year/__manifest__.py new file mode 100644 index 00000000000..0fe78383bea --- /dev/null +++ b/account_fiscal_year/__manifest__.py @@ -0,0 +1,25 @@ +# Copyright 2016 Camptocamp SA +# Copyright 2018 Lorenzo Battistini +# Copyright 2020 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Account Fiscal Year", + "summary": "Create Account Fiscal Year", + "version": "16.0.1.0.0", + "development_status": "Production/Stable", + "category": "Accounting", + "website": "https://github.com/OCA/account-financial-tools" + "14.0/account_fiscal_year", + "author": "Agile Business Group, Camptocamp SA, " + "Odoo Community Association (OCA)", + "maintainers": ["eLBati"], + "license": "AGPL-3", + "depends": [ + "account", + ], + "data": [ + "security/ir.model.access.csv", + "security/account_fiscal_year_rule.xml", + "views/account_fiscal_year_views.xml", + ], +} diff --git a/account_fiscal_year/i18n/account_fiscal_year.pot b/account_fiscal_year/i18n/account_fiscal_year.pot new file mode 100644 index 00000000000..116129963e1 --- /dev/null +++ b/account_fiscal_year/i18n/account_fiscal_year.pot @@ -0,0 +1,119 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \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: \n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +msgid "Display Name" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +msgid "ID" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "" + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "" + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" diff --git a/account_fiscal_year/i18n/es.po b/account_fiscal_year/i18n/es.po new file mode 100644 index 00000000000..bfb770a5b35 --- /dev/null +++ b/account_fiscal_year/i18n/es.po @@ -0,0 +1,122 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-05-20 19:05+0000\n" +"Last-Translator: Dept. Técnico \n" +"Language-Team: none\n" +"Language: es\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "Clicar aquí para crear un nuevo ejercicio fiscal." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "Compañía" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "Fecha final" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "Fecha de finalización, incluida en el año fiscal." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "Año fiscal" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "Año fiscal 2020" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "Años fiscales" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +msgid "ID" +msgstr "ID" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "Nombre" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "Fecha inicial" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "" + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "" + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" diff --git a/account_fiscal_year/i18n/fr.po b/account_fiscal_year/i18n/fr.po new file mode 100644 index 00000000000..6b1cf543c43 --- /dev/null +++ b/account_fiscal_year/i18n/fr.po @@ -0,0 +1,125 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-03-28 18:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "Cliquez ici pour créer un nouvel exercice." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "Société" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "Date de fin" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "Date de fin, incluse dans l'exercice." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "Exercice" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "Exercice 2020" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "Exercices" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__id +msgid "ID" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "Nom" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "Date de début" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "Date de début, incluse dans l'exercice." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "La date de début doit précéder la date de fin." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" diff --git a/account_fiscal_year/i18n/fr_FR.po b/account_fiscal_year/i18n/fr_FR.po new file mode 100644 index 00000000000..58791c64040 --- /dev/null +++ b/account_fiscal_year/i18n/fr_FR.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-15 18:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr_FR\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "Cliquez ici pour créer un nouvel exercice." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "Société" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "Date de fin" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "Date de fin, incluse dans l'exercice." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "Exercice" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "Exercice 2020" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "Exercices" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__id +msgid "ID" +msgstr "" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "Nom" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "Date de début" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "Date de début, incluse dans l'exercice." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "La date de début doit précéder la date de fin." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" +"L'exercice '{fy}' chevauche avec '{overlapping_fy}'.\n" +"Veuillez modifier les dates de début et de fin." diff --git a/account_fiscal_year/i18n/it.po b/account_fiscal_year/i18n/it.po new file mode 100644 index 00000000000..8bbad7a57d8 --- /dev/null +++ b/account_fiscal_year/i18n/it.po @@ -0,0 +1,128 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-11-09 08:15+0000\n" +"PO-Revision-Date: 2021-12-03 12:36+0000\n" +"Last-Translator: Francesco Foresti \n" +"Language-Team: \n" +"Language: it\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "Clicca qui per creare un nuovo anno fiscale." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "Aziende" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "Azienda" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "Creato da" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "Creato il" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "Data fine" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "Data di chiusura, inclusa nell'anno fiscale." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "Anni fiscali" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "Anno fiscale 2020" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "Anni fiscali" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__id +msgid "ID" +msgstr "ID" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "Ultimo aggiornamento di" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "Ultimo aggiornamento il" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "Nome" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "Data inizio" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "Data inizio, inclusa nell'anno fiscale." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "La data di fine non deve essere antecedente a quella di inizio." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" +"Questo anno fiscale '{fy}' si sovrappone a '{overlapping_fy}'.\n" +"Correggere le relative date di inizio e/o di fine." diff --git a/account_fiscal_year/i18n/nl.po b/account_fiscal_year/i18n/nl.po new file mode 100644 index 00000000000..bdbda427cd1 --- /dev/null +++ b/account_fiscal_year/i18n/nl.po @@ -0,0 +1,127 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_fiscal_year +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-14 21:46+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\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" +"X-Generator: Weblate 4.3.2\n" + +#. module: account_fiscal_year +#: model_terms:ir.actions.act_window,help:account_fiscal_year.actions_account_fiscal_year +msgid "Click here to create a new fiscal year." +msgstr "Klik hier om een nieuw fiscaal jaar aan te maken." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_res_company +msgid "Companies" +msgstr "Bedrijven" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__company_id +msgid "Company" +msgstr "Bedrijf" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_uid +msgid "Created by" +msgstr "Aangemaakt door" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__create_date +msgid "Created on" +msgstr "aangemaakt op" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__display_name +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__display_name +msgid "Display Name" +msgstr "Weergavenaam" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_to +msgid "End Date" +msgstr "Einddatum" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_to +msgid "Ending Date, included in the fiscal year." +msgstr "Einddatum, opnemen in het fiscale jaar." + +#. module: account_fiscal_year +#: model:ir.model,name:account_fiscal_year.model_account_fiscal_year +msgid "Fiscal Year" +msgstr "Fiscaal jaar" + +#. module: account_fiscal_year +#: model_terms:ir.ui.view,arch_db:account_fiscal_year.account_fiscal_year_form_view +msgid "Fiscal Year 2020" +msgstr "Fiscaal jaar 2020" + +#. module: account_fiscal_year +#: model:ir.actions.act_window,name:account_fiscal_year.actions_account_fiscal_year +#: model:ir.ui.menu,name:account_fiscal_year.menu_actions_account_fiscal_year +msgid "Fiscal Years" +msgstr "Fiscale jaren" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__id +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company__id +msgid "ID" +msgstr "ID" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year____last_update +#: model:ir.model.fields,field_description:account_fiscal_year.field_res_company____last_update +msgid "Last Modified on" +msgstr "Laatst bijgewerkt op" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_uid +msgid "Last Updated by" +msgstr "Laatst bijgewerkt door" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__write_date +msgid "Last Updated on" +msgstr "Laatst bijgewerkt op" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__name +msgid "Name" +msgstr "Naam" + +#. module: account_fiscal_year +#: model:ir.model.fields,field_description:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date" +msgstr "Start Datum" + +#. module: account_fiscal_year +#: model:ir.model.fields,help:account_fiscal_year.field_account_fiscal_year__date_from +msgid "Start Date, included in the fiscal year." +msgstr "Begindatum, opgenomen in het fiscale jaar." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "The ending date must not be prior to the starting date." +msgstr "De einddatum kan niet eerder zijn dan de start datum." + +#. module: account_fiscal_year +#: code:addons/account_fiscal_year/models/account_fiscal_year.py:0 +#, python-format +msgid "" +"This fiscal year '{fy}' overlaps with '{overlapping_fy}'.\n" +"Please correct the start and/or end dates of your fiscal years." +msgstr "" +"Dit fiscale jaar '{fy}' overlap met '{overlapping_fy}'.\n" +"Corrigeer de begin en/of eind data van de fiscale jaren." diff --git a/account_fiscal_year/models/__init__.py b/account_fiscal_year/models/__init__.py new file mode 100644 index 00000000000..2262fe09413 --- /dev/null +++ b/account_fiscal_year/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import account_fiscal_year +from . import res_company diff --git a/account_fiscal_year/models/account_fiscal_year.py b/account_fiscal_year/models/account_fiscal_year.py new file mode 100644 index 00000000000..9054f79ee32 --- /dev/null +++ b/account_fiscal_year/models/account_fiscal_year.py @@ -0,0 +1,109 @@ +# Copyright 2020 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError +from odoo.osv import expression + + +class AccountFiscalYear(models.Model): + _name = "account.fiscal.year" + _description = "Fiscal Year" + + name = fields.Char( + required=True, + ) + date_from = fields.Date( + string="Start Date", + required=True, + help="Start Date, included in the fiscal year.", + ) + date_to = fields.Date( + string="End Date", + required=True, + help="Ending Date, included in the fiscal year.", + ) + company_id = fields.Many2one( + comodel_name="res.company", + string="Company", + required=True, + default=lambda self: self.env.company, + ) + + @api.constrains("date_from", "date_to", "company_id") + def _check_dates(self): + """Check intersection with existing fiscal years.""" + for fy in self: + # Starting date must be prior to the ending date + date_from = fy.date_from + date_to = fy.date_to + if date_to < date_from: + raise ValidationError( + _("The ending date must not be prior to the starting date.") + ) + + domain = fy._get_overlapping_domain() + overlapping_fy = self.search(domain, limit=1) + if overlapping_fy: + raise ValidationError( + _( + "This fiscal year '{fy}' " + "overlaps with '{overlapping_fy}'.\n" + "Please correct the start and/or end dates " + "of your fiscal years." + ).format( + fy=fy.display_name, + overlapping_fy=overlapping_fy.display_name, + ) + ) + + def _get_overlapping_domain(self): + """Get domain for finding fiscal years overlapping with self. + + The domain will search only among fiscal years of this company. + """ + self.ensure_one() + # Compare with other fiscal years defined for this company + company_domain = [ + ("id", "!=", self.id), + ("company_id", "=", self.company_id.id), + ] + + date_from = self.date_from + date_to = self.date_to + # Search fiscal years intersecting with current fiscal year. + # This fiscal year's `from` is contained in another fiscal year + # other.from <= fy.from <= other.to + intersection_domain_from = [ + "&", + ("date_from", "<=", date_from), + ("date_to", ">=", date_from), + ] + # This fiscal year's `to` is contained in another fiscal year + # other.from <= fy.to <= other.to + intersection_domain_to = [ + "&", + ("date_from", "<=", date_to), + ("date_to", ">=", date_to), + ] + # This fiscal year completely contains another fiscal year + # fy.from <= other.from (or other.to) <= fy.to + intersection_domain_contain = [ + "&", + ("date_from", ">=", date_from), + ("date_from", "<=", date_to), + ] + intersection_domain = expression.OR( + [ + intersection_domain_from, + intersection_domain_to, + intersection_domain_contain, + ] + ) + + return expression.AND( + [ + company_domain, + intersection_domain, + ] + ) diff --git a/account_fiscal_year/models/res_company.py b/account_fiscal_year/models/res_company.py new file mode 100644 index 00000000000..cc5e2ac6ca8 --- /dev/null +++ b/account_fiscal_year/models/res_company.py @@ -0,0 +1,79 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from datetime import timedelta + +from odoo import models +from odoo.tools import date_utils + + +class ResCompany(models.Model): + _inherit = "res.company" + + def compute_fiscalyear_dates(self, current_date): + """Computes the start and end dates of the fiscal year + where the given 'date' belongs to. + + :param current_date: A datetime.date/datetime.datetime object. + :return: A dictionary containing: + * date_from + * date_to + * [Optionally] record: The fiscal year record. + """ + self.ensure_one() + + # Search a fiscal year record containing the date. + fiscalyear = self.env["account.fiscal.year"].search( + [ + ("company_id", "=", self.id), + ("date_from", "<=", current_date), + ("date_to", ">=", current_date), + ], + limit=1, + ) + if fiscalyear: + return { + "date_from": fiscalyear.date_from, + "date_to": fiscalyear.date_to, + "record": fiscalyear, + } + + date_from, date_to = date_utils.get_fiscal_year( + current_date, + day=self.fiscalyear_last_day, + month=int(self.fiscalyear_last_month), + ) + + # Search for fiscal year records reducing + # the delta between the date_from/date_to. + # This case could happen if there is a gap + # between two fiscal year records. + # E.g. two fiscal year records: + # 2017-01-01 -> 2017-02-01 and 2017-03-01 -> 2017-12-31. + # => + # The period 2017-02-02 - 2017-02-30 is not covered by a fiscal year record. + + fiscalyear_from = self.env["account.fiscal.year"].search( + [ + ("company_id", "=", self.id), + ("date_from", "<=", date_from), + ("date_to", ">=", date_from), + ], + limit=1, + ) + if fiscalyear_from: + date_from = fiscalyear_from.date_to + timedelta(days=1) + + fiscalyear_to = self.env["account.fiscal.year"].search( + [ + ("company_id", "=", self.id), + ("date_from", "<=", date_to), + ("date_to", ">=", date_to), + ], + limit=1, + ) + if fiscalyear_to: + date_to = fiscalyear_to.date_from - timedelta(days=1) + + return { + "date_from": date_from, + "date_to": date_to, + } diff --git a/account_fiscal_year/readme/CONTRIBUTORS.rst b/account_fiscal_year/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..144ead79468 --- /dev/null +++ b/account_fiscal_year/readme/CONTRIBUTORS.rst @@ -0,0 +1,9 @@ +* Damien Crier +* Laurent Mignon +* Lorenzo Battistini +* Andrea Stirpe +* Simone Rubino + +* `Pesol `__: + + * Pedro Evaristo Gonzalez Sanchez diff --git a/account_fiscal_year/readme/DESCRIPTION.rst b/account_fiscal_year/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..fa1a407addf --- /dev/null +++ b/account_fiscal_year/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module allows to create and edit fiscal years from the menu: + +Invoicing > Configuration > Accounting > Fiscal Years diff --git a/account_fiscal_year/readme/ROADMAP.rst b/account_fiscal_year/readme/ROADMAP.rst new file mode 100644 index 00000000000..6edee466809 --- /dev/null +++ b/account_fiscal_year/readme/ROADMAP.rst @@ -0,0 +1 @@ +The account.fiscal.year model definition and views come from the core of Odoo v13 community because in v14, account.fiscal.year has been moved to Odoo enterprise. diff --git a/account_fiscal_year/security/account_fiscal_year_rule.xml b/account_fiscal_year/security/account_fiscal_year_rule.xml new file mode 100644 index 00000000000..51191e46c48 --- /dev/null +++ b/account_fiscal_year/security/account_fiscal_year_rule.xml @@ -0,0 +1,19 @@ + + + + + + + Fiscal Year multi-company + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + diff --git a/account_fiscal_year/security/ir.model.access.csv b/account_fiscal_year/security/ir.model.access.csv new file mode 100644 index 00000000000..7fe98c4df20 --- /dev/null +++ b/account_fiscal_year/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_fiscal_year_user,account.fiscal.year.user,model_account_fiscal_year,account.group_account_user,1,0,0,0 +access_account_fiscal_year_manager,account.fiscal.year.manager,model_account_fiscal_year,account.group_account_manager,1,1,1,1 diff --git a/account_fiscal_year/static/description/icon.png b/account_fiscal_year/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/account_fiscal_year/static/description/icon.png differ diff --git a/account_fiscal_year/static/description/index.html b/account_fiscal_year/static/description/index.html new file mode 100644 index 00000000000..76e8848a067 --- /dev/null +++ b/account_fiscal_year/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Account Fiscal Year + + + +
+

Account Fiscal Year

+ + +

Production/Stable License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

This module allows to create and edit fiscal years from the menu:

+

Invoicing > Configuration > Accounting > Fiscal Years

+

Table of contents

+ +
+

Known issues / Roadmap

+

The account.fiscal.year model definition and views come from the core of Odoo v13 community because in v14, account.fiscal.year has been moved to Odoo enterprise.

+
+
+

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
  • +
  • Camptocamp SA
  • +
+
+
+

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.

+

Current maintainer:

+

eLBati

+

This module is part of the OCA/account-financial-tools project on GitHub.

+

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

+
+
+
+ + diff --git a/account_fiscal_year/tests/__init__.py b/account_fiscal_year/tests/__init__.py new file mode 100644 index 00000000000..4960202ddab --- /dev/null +++ b/account_fiscal_year/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_account_fiscal_year diff --git a/account_fiscal_year/tests/test_account_fiscal_year.py b/account_fiscal_year/tests/test_account_fiscal_year.py new file mode 100644 index 00000000000..5f9bf733138 --- /dev/null +++ b/account_fiscal_year/tests/test_account_fiscal_year.py @@ -0,0 +1,132 @@ +from odoo import fields +from odoo.tests import common + + +class TestFiscalPosition(common.TransactionCase): + def check_compute_fiscal_year( + self, company, date, expected_date_from, expected_date_to + ): + """Compute the fiscal year at a certain date for the company + passed as parameter. + Then, check if the result matches the + 'expected_date_from'/'expected_date_to' dates. + + :param company: The company. + :param date: The date belonging to the fiscal year. + :param expected_date_from: The expected date_from after computation. + :param expected_date_to: The expected date_to after computation. + """ + current_date = fields.Date.from_string(date) + res = company.compute_fiscalyear_dates(current_date) + self.assertEqual(res["date_from"], fields.Date.from_string(expected_date_from)) + self.assertEqual(res["date_to"], fields.Date.from_string(expected_date_to)) + + def test_default_fiscal_year(self): + """Basic case with a fiscal year xxxx-01-01 - xxxx-12-31.""" + company = self.env.ref("base.main_company") + company.fiscalyear_last_day = 31 + company.fiscalyear_last_month = "12" + + self.check_compute_fiscal_year( + company, + "2017-12-31", + "2017-01-01", + "2017-12-31", + ) + + self.check_compute_fiscal_year( + company, + "2017-01-01", + "2017-01-01", + "2017-12-31", + ) + + def test_leap_fiscal_year_1(self): + """Case with a leap year ending the 29 February.""" + company = self.env.ref("base.main_company") + company.fiscalyear_last_day = 29 + company.fiscalyear_last_month = "2" + + self.check_compute_fiscal_year( + company, + "2016-02-29", + "2015-03-01", + "2016-02-29", + ) + + self.check_compute_fiscal_year( + company, + "2015-03-01", + "2015-03-01", + "2016-02-29", + ) + + def test_leap_fiscal_year_2(self): + """Case with a leap year ending the 28 February.""" + company = self.env.ref("base.main_company") + company.fiscalyear_last_day = 28 + company.fiscalyear_last_month = "2" + + self.check_compute_fiscal_year( + company, + "2016-02-29", + "2015-03-01", + "2016-02-29", + ) + + self.check_compute_fiscal_year( + company, + "2016-03-01", + "2016-03-01", + "2017-02-28", + ) + + def test_custom_fiscal_year(self): + """Case with custom fiscal years.""" + company = self.env.ref("base.main_company") + company.fiscalyear_last_day = 31 + company.fiscalyear_last_month = "12" + + # Create custom fiscal year covering the 6 first months of 2017. + self.env["account.fiscal.year"].create( + { + "name": "6 month 2017", + "date_from": "2017-01-01", + "date_to": "2017-05-31", + "company_id": company.id, + } + ) + + # Check before the custom fiscal year). + self.check_compute_fiscal_year( + company, + "2017-02-01", + "2017-01-01", + "2017-05-31", + ) + + # Check after the custom fiscal year. + self.check_compute_fiscal_year( + company, + "2017-11-01", + "2017-06-01", + "2017-12-31", + ) + + # Create custom fiscal year covering the 3 last months of 2017. + self.env["account.fiscal.year"].create( + { + "name": "last 3 month 2017", + "date_from": "2017-10-01", + "date_to": "2017-12-31", + "company_id": company.id, + } + ) + + # Check inside the custom fiscal years. + self.check_compute_fiscal_year( + company, + "2017-07-01", + "2017-06-01", + "2017-09-30", + ) diff --git a/account_fiscal_year/views/account_fiscal_year_views.xml b/account_fiscal_year/views/account_fiscal_year_views.xml new file mode 100644 index 00000000000..35c246aab87 --- /dev/null +++ b/account_fiscal_year/views/account_fiscal_year_views.xml @@ -0,0 +1,63 @@ + + + + + Form view for account.fiscal.year + account.fiscal.year + +
+ + + + + + + + +
+
+
+ + + Search view for account.fiscal.year + account.fiscal.year + + + + + + + + + Tree view for account.fiscal.year + account.fiscal.year + + + + + + + + + + + + Fiscal Years + account.fiscal.year + tree,form + +

+ Click here to create a new fiscal year. +

+
+
+ + +
diff --git a/setup/account_fiscal_year/odoo/addons/account_fiscal_year b/setup/account_fiscal_year/odoo/addons/account_fiscal_year new file mode 120000 index 00000000000..3b277c5ebe1 --- /dev/null +++ b/setup/account_fiscal_year/odoo/addons/account_fiscal_year @@ -0,0 +1 @@ +../../../../account_fiscal_year \ No newline at end of file diff --git a/setup/account_fiscal_year/setup.py b/setup/account_fiscal_year/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/account_fiscal_year/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)