Skip to content

Commit

Permalink
Merge branch '16.0' into TA#66819
Browse files Browse the repository at this point in the history
  • Loading branch information
majouda authored Jul 2, 2024
2 parents be4a635 + 116bd8c commit 7d630c4
Show file tree
Hide file tree
Showing 78 changed files with 1,027 additions and 43 deletions.
52 changes: 24 additions & 28 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,26 @@ jobs:
name: Run Test
command: docker-compose run --rm odoo run_pytest.sh

# - run:
# name: Codacy Coverage
# command: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -l python -r .log/coverage.xml

# - store_test_results:
# path: .log
- store_test_results:
path: .log

# job that find the next tag for the current branch/repo and push the tag to github.
# it will trigger the publish of a new docker image.
# auto-tag:
# machine: true
# steps:
# - checkout
# - run:
# <<: *quay_io_login
# - run:
# name: Get nws
# command: |
# curl -L $NWS_BIN_LOCATION > ./nws
# chmod +x ./nws
# - run:
# name: Set tag
# command: |
# ./nws circleci create-tag -t odoo-base
auto-tag:
machine: true
steps:
- checkout
- run:
<<: *quay_io_login
- run:
name: Get nws
command: |
curl -L $NWS_BIN_LOCATION > ./nws
chmod +x ./nws
- run:
name: Set tag
command: |
./nws circleci create-tag -t odoo-base
workflows:
version: 2
Expand All @@ -57,10 +53,10 @@ workflows:
- tests:
context: quay.io

# - auto-tag:
# context: nws
# requires:
# - tests
# filters:
# branches:
# only: /^1\d\.0/
- auto-tag:
context: nws
requires:
- tests
filters:
branches:
only: /^1\d\.0/
7 changes: 7 additions & 0 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"category": "Other",
"summary": "Install all addons required for testing.",
"depends": [
"account",
"account_bank_menu",
"account_closing_journal",
"account_invoice_constraint_chronology_forced",
"account_negative_debit_credit",
"account_payment_cancel_group",
"account_show_full_features",
"invoice_refund_not_earlier",
"old_accounts",
],
"installable": True,
Expand Down
2 changes: 1 addition & 1 deletion .docker_files/odoo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ log_handler = :INFO
log_level = info
logfile = None
logrotate = False
longpolling_port = 8071
gevent-port = 8071
max_cron_threads = 1
transient_age_limit = 1.0
transient_count_limit = False
Expand Down
2 changes: 2 additions & 0 deletions .docker_files/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
unidecode==1.0.23
odoo_test_helper
stripe==4.1.0
freezegun==0.3.4
ddt==1.4.2
2 changes: 0 additions & 2 deletions .docker_files/test-requirements.txt

This file was deleted.

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
18 changes: 10 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
FROM quay.io/numigi/odoo-public:16.latest
LABEL maintainer="[email protected]"
LABEL maintainer="numigi <[email protected]>"

USER root

COPY .docker_files/test-requirements.txt .
RUN pip3 install -r test-requirements.txt

COPY .docker_files/requirements.txt .
RUN pip3 install -r requirements.txt

# Variable used for fetching private git repositories.
ARG GIT_TOKEN

ENV THIRD_PARTY_ADDONS /mnt/third-party-addons
RUN mkdir -p "${THIRD_PARTY_ADDONS}" && chown -R odoo "${THIRD_PARTY_ADDONS}"
COPY ./gitoo.yml /gitoo.yml
RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS}"
RUN if [ -s /gitoo.yml ]; then \
gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS}"; \
fi

USER odoo

COPY account_bank_menu /mnt/extra-addons/account_bank_menu
COPY account_closing_journal /mnt/extra-addons/account_closing_journal
COPY account_invoice_constraint_chronology_forced /mnt/extra-addons/account_invoice_constraint_chronology_forced
COPY account_negative_debit_credit /mnt/extra-addons/account_negative_debit_credit
COPY account_payment_cancel_group /mnt/extra-addons/account_payment_cancel_group
COPY account_show_full_features /mnt/extra-addons/account_show_full_features
COPY invoice_refund_not_earlier /mnt/extra-addons/invoice_refund_not_earlier
COPY old_accounts /mnt/extra-addons/old_accounts

COPY .docker_files/main /mnt/extra-addons/main
Expand Down
18 changes: 18 additions & 0 deletions account_bank_menu/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
=================
Bank Account Menu
=================
This module adds missing menu entries to configure bank accounts and banks in the accounting application.

.. image:: static/description/bank_menus.png

When I click on Partner Bank Accounts, the list of bank accounts is displayed.

.. image:: static/description/bank_accounts_list_view.png

When I click on Partner Banks, the list of banks is displayed.

.. image:: static/description/bank_list_view.png

Contributors
------------
* Numigi (tm) and all its contributors (https://bit.ly/numigiens)
2 changes: 2 additions & 0 deletions account_bank_menu/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2024-today Numigi and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
20 changes: 20 additions & 0 deletions account_bank_menu/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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 Bank Menu",
"version": "16.0.1.0.0",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://www.numigi.com",
"license": "LGPL-3",
"category": "Accounting",
"summary": "Add menu entries to configure bank accounts and banks of partners",
"depends": [
"account",
],
"data": [
"views/bank_menu.xml",
],
"installable": True,
}
26 changes: 26 additions & 0 deletions account_bank_menu/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_bank_menu
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-05-13 18:39+0000\n"
"PO-Revision-Date: 2024-05-13 18:39+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_bank_menu
#: model:ir.ui.menu,name:account_bank_menu.bank_account_menu
msgid "Partner Bank Accounts"
msgstr "Comptes bancaires partenaires"

#. module: account_bank_menu
#: model:ir.ui.menu,name:account_bank_menu.bank_menu
msgid "Partner Banks"
msgstr "Banques partenaires"
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.
Binary file added account_bank_menu/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions account_bank_menu/views/bank_menu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<menuitem
id="bank_account_menu"
name="Partner Bank Accounts"
action="base.action_res_partner_bank_account_form"
parent="account.account_account_menu"
/>

<menuitem
id="bank_menu"
name="Partner Banks"
action="base.action_res_bank_form"
parent="account.account_account_menu"
/>

</odoo>
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
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).

{
"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,
)
Loading

0 comments on commit 7d630c4

Please sign in to comment.