diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index 69d4d3b..e36f183 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -1,4 +1,4 @@ -# © 2024 Numigi +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { @@ -13,6 +13,7 @@ "depends": [ "account", "account_bank_menu", + "account_closing_journal", "account_show_full_features", "old_accounts", ], diff --git a/.flake8 b/.flake8 index 15d225b..b6a254e 100644 --- a/.flake8 +++ b/.flake8 @@ -9,4 +9,4 @@ select = C,E,F,W,B,B9 # W503: line break before binary operator (black behaviour) ignore = E203,E501,W503,F821 per-file-ignores= - __init__.py:F401 \ No newline at end of file + __init__.py:F401 diff --git a/Dockerfile b/Dockerfile index cefc4d5..26254b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS USER odoo COPY account_bank_menu /mnt/extra-addons/account_bank_menu +COPY account_closing_journal /mnt/extra-addons/account_closing_journal COPY account_show_full_features /mnt/extra-addons/account_show_full_features COPY old_accounts /mnt/extra-addons/old_accounts diff --git a/account_closing_journal/README.rst b/account_closing_journal/README.rst new file mode 100644 index 0000000..f9cae5f --- /dev/null +++ b/account_closing_journal/README.rst @@ -0,0 +1,35 @@ +======================= +Account Closing Journal +======================= + +.. contents:: Table of Contents + +Overview +-------- +This module allows to define an accounting journal as ``Closing Journal``. + +.. image:: static/description/account_journal_form.png + +When checked, any journal entry reported in the journal is flagged as a ``Closing Entry``. + +.. image:: static/description/account_move_list.png + +.. image:: static/description/account_move_line_list.png + +Module Design +------------- +The module adds a boolean field ``is_closing`` on account.journal +and a related ``is_closing`` field on account.move and account.move.line. + +These boolean fields can be used to exclude entries from the ``Income Statement``. + +Generating Closing Entries +-------------------------- +This module does not define an automatted way to generate closing entries. + +You must either create this entry manually at the end of your fiscal year, +or define another module to generate these entries for you. + +Contributors +------------ +* Numigi (tm) and all its contributors (https://bit.ly/numigiens) diff --git a/account_closing_journal/__init__.py b/account_closing_journal/__init__.py new file mode 100644 index 0000000..63bd6ae --- /dev/null +++ b/account_closing_journal/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import models diff --git a/account_closing_journal/__manifest__.py b/account_closing_journal/__manifest__.py new file mode 100644 index 0000000..05fa59b --- /dev/null +++ b/account_closing_journal/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +{ + "name": "Account Closing Journal", + "version": "16.0.1.0.0", + "author": "Numigi", + "maintainer": "Numigi", + "website": "https://www.numigi.com", + "license": "LGPL-3", + "category": "Accounting", + "summary": "Allow to define a fiscal year closing journal", + "depends": [ + "account", + ], + "data": [ + "views/account_journal.xml", + "views/account_move.xml", + "views/account_move_line.xml", + ], + "installable": True, +} diff --git a/account_closing_journal/i18n/fr.po b/account_closing_journal/i18n/fr.po new file mode 100644 index 0000000..3c9d76e --- /dev/null +++ b/account_closing_journal/i18n/fr.po @@ -0,0 +1,54 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_closing_journal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-04-20 20:31+0000\n" +"PO-Revision-Date: 2024-04-20 20:31+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: \n" + +#. module: account_closing_journal +#: model_terms:ir.ui.view,arch_db:account_closing_journal.account_journal_form +#: model_terms:ir.ui.view,arch_db:account_closing_journal.account_move__line_search +#: model_terms:ir.ui.view,arch_db:account_closing_journal.account_move_search +msgid "Fiscal Year Closing" +msgstr "Fermeture d'exercice" + +#. module: account_closing_journal +#: model:ir.model.fields,field_description:account_closing_journal.field_account_move__is_closing +msgid "Is Closing Entry" +msgstr "Est une pièce de fermeture" + +#. module: account_closing_journal +#: model:ir.model.fields,field_description:account_closing_journal.field_account_move_line__is_closing +msgid "Is Closing Item" +msgstr "Est une écriture de fermeture" + +#. module: account_closing_journal +#: model:ir.model.fields,field_description:account_closing_journal.field_account_journal__is_closing +msgid "Is Closing Journal" +msgstr "Est un journal de fermeture" + +#. module: account_closing_journal +#: model:ir.model,name:account_closing_journal.model_account_journal +msgid "Journal" +msgstr "" + +#. module: account_closing_journal +#: model:ir.model,name:account_closing_journal.model_account_move +msgid "Journal Entries" +msgstr "" + +#. module: account_closing_journal +#: model:ir.model,name:account_closing_journal.model_account_move_line +msgid "Journal Item" +msgstr "" + diff --git a/account_closing_journal/models/__init__.py b/account_closing_journal/models/__init__.py new file mode 100644 index 0000000..93130f4 --- /dev/null +++ b/account_closing_journal/models/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from . import account_journal # noqa: F401 +from . import account_move # noqa: F401 +from . import account_move_line # noqa: F401 diff --git a/account_closing_journal/models/account_journal.py b/account_closing_journal/models/account_journal.py new file mode 100644 index 0000000..f5c3328 --- /dev/null +++ b/account_closing_journal/models/account_journal.py @@ -0,0 +1,11 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class AccountJournal(models.Model): + + _inherit = "account.journal" + + is_closing = fields.Boolean("Is Closing Journal") diff --git a/account_closing_journal/models/account_move.py b/account_closing_journal/models/account_move.py new file mode 100644 index 0000000..387313c --- /dev/null +++ b/account_closing_journal/models/account_move.py @@ -0,0 +1,15 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class AccountMove(models.Model): + + _inherit = "account.move" + + is_closing = fields.Boolean( + "Is Closing Entry", + related="journal_id.is_closing", + store=True, + ) diff --git a/account_closing_journal/models/account_move_line.py b/account_closing_journal/models/account_move_line.py new file mode 100644 index 0000000..1664755 --- /dev/null +++ b/account_closing_journal/models/account_move_line.py @@ -0,0 +1,15 @@ +# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens) +# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). + +from odoo import fields, models + + +class AccountMoveLine(models.Model): + + _inherit = "account.move.line" + + is_closing = fields.Boolean( + "Is Closing Item", + related="journal_id.is_closing", + store=True, + ) diff --git a/account_closing_journal/static/description/account_journal_form.png b/account_closing_journal/static/description/account_journal_form.png new file mode 100644 index 0000000..62cba8f Binary files /dev/null and b/account_closing_journal/static/description/account_journal_form.png differ diff --git a/account_closing_journal/static/description/account_move_line_list.png b/account_closing_journal/static/description/account_move_line_list.png new file mode 100644 index 0000000..db96d3a Binary files /dev/null and b/account_closing_journal/static/description/account_move_line_list.png differ diff --git a/account_closing_journal/static/description/account_move_list.png b/account_closing_journal/static/description/account_move_list.png new file mode 100644 index 0000000..34b282e Binary files /dev/null and b/account_closing_journal/static/description/account_move_list.png differ diff --git a/account_closing_journal/static/description/icon.png b/account_closing_journal/static/description/icon.png new file mode 100644 index 0000000..92a86b1 Binary files /dev/null and b/account_closing_journal/static/description/icon.png differ diff --git a/account_closing_journal/views/account_journal.xml b/account_closing_journal/views/account_journal.xml new file mode 100644 index 0000000..e219a7e --- /dev/null +++ b/account_closing_journal/views/account_journal.xml @@ -0,0 +1,17 @@ + + + + + Account Journal Form: add is_closing + account.journal + + + + + + + + + + + diff --git a/account_closing_journal/views/account_move.xml b/account_closing_journal/views/account_move.xml new file mode 100644 index 0000000..b5f47c9 --- /dev/null +++ b/account_closing_journal/views/account_move.xml @@ -0,0 +1,15 @@ + + + + + Account Move Search: add is_closing + account.move + + + + + + + + + diff --git a/account_closing_journal/views/account_move_line.xml b/account_closing_journal/views/account_move_line.xml new file mode 100644 index 0000000..f133a67 --- /dev/null +++ b/account_closing_journal/views/account_move_line.xml @@ -0,0 +1,16 @@ + + + + + Account Move Line Search: add is_closing + account.move.line + + + + + + + + + +