Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TA#66893 [MIG][16.0] account_closing_journal #182

Merged
merged 7 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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).

{
Expand All @@ -13,6 +13,7 @@
"depends": [
"account",
"account_bank_menu",
"account_closing_journal",
"account_show_full_features",
"old_accounts",
],
Expand Down
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -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
__init__.py:F401
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
35 changes: 35 additions & 0 deletions account_closing_journal/README.rst
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 4 additions & 0 deletions account_closing_journal/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Check notice on line 4 in account_closing_journal/__init__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

account_closing_journal/__init__.py#L4

'.models' imported but unused (F401)
22 changes: 22 additions & 0 deletions account_closing_journal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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).

{

Check warning on line 4 in account_closing_journal/__manifest__.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

account_closing_journal/__manifest__.py#L4

Statement seems to have no effect
"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,
}
54 changes: 54 additions & 0 deletions account_closing_journal/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -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 ""

6 changes: 6 additions & 0 deletions account_closing_journal/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions account_closing_journal/models/account_journal.py
Original file line number Diff line number Diff line change
@@ -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")
15 changes: 15 additions & 0 deletions account_closing_journal/models/account_move.py
Original file line number Diff line number Diff line change
@@ -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,
)
15 changes: 15 additions & 0 deletions account_closing_journal/models/account_move_line.py
Original file line number Diff line number Diff line change
@@ -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,
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions account_closing_journal/views/account_journal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="account_journal_form" model="ir.ui.view">
<field name="name">Account Journal Form: add is_closing</field>
<field name="model">account.journal</field>
<field name="inherit_id" ref="account.view_account_journal_form" />
<field name="arch" type="xml">
<xpath expr="//page[@name='advanced_settings']/group" position="inside">
<group name="closing" string="Fiscal Year Closing">
<field name="is_closing" />
</group>
</xpath>
</field>
</record>

</odoo>
15 changes: 15 additions & 0 deletions account_closing_journal/views/account_move.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="account_move_search" model="ir.ui.view">
<field name="name">Account Move Search: add is_closing</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_account_move_filter" />
<field name="arch" type="xml">
<filter name="misc_filter" position="after">
<filter name="is_closing" string="Fiscal Year Closing" domain="[('is_closing', '=', True)]" />
</filter>
</field>
</record>

</odoo>
16 changes: 16 additions & 0 deletions account_closing_journal/views/account_move_line.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="account_move__line_search" model="ir.ui.view">
<field name="name">Account Move Line Search: add is_closing</field>
<field name="model">account.move.line</field>
<field name="inherit_id" ref="account.view_account_move_line_filter" />
<field name="arch" type="xml">
<xpath expr="//separator[last()]" position="after">
<filter name="is_closing" string="Fiscal Year Closing" domain="[('is_closing', '=', True)]" />
<separator/>
</xpath>
</field>
</record>

</odoo>
Loading