Skip to content
Open
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
94 changes: 94 additions & 0 deletions account_move_total_by_account_internal_group/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================================
Account Move Total By Account Internal Group
============================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:94fb26a31f942a6e265b921efe62885d160e7035ad54215d27042b59c67bd7e1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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/19.0/account_move_total_by_account_internal_group
: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-19-0/account-financial-tools-19-0-account_move_total_by_account_internal_group
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Displays the total balance by account internal group in the journal
entries. This could be necesssary in some context. For example, when
looking at the stock journal entries we would like to see the total
assets, as long as we would like to see the assets increasing when there
is a debit in the inventory account and deceasing when the inventory is
decreased. The standard field amount_total_signed does not serve, as it
shows this as a positive value in this case.

**Table of contents**

.. contents::
:local:

Usage
=====

New hidden columns in journal Entries tree view.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_move_total_by_account_internal_group%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* ForgeFlow

Contributors
------------

- \`ForgeFlow
<`https://opensourceintegrators.com\\>\\\` <https://opensourceintegrators.com\>\`>`__:

- Aaron Henriquez <[email protected]>

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.

This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/19.0/account_move_total_by_account_internal_group>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_move_total_by_account_internal_group/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import pre_init_hook
20 changes: 20 additions & 0 deletions account_move_total_by_account_internal_group/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2022 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Move Total By Account Internal Group",
"version": "19.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"summary": "Adds Totals by Account Internal Group in Journal Entries",
"website": "https://github.com/OCA/account-financial-tools",
"license": "AGPL-3",
"depends": ["account"],
"category": "Accounting",
"data": [
"views/account_move_views.xml",
],
"installable": True,
"maintainer": "AaronHForgeFlow",
"development_status": "Beta",
"pre_init_hook": "pre_init_hook",
}
27 changes: 27 additions & 0 deletions account_move_total_by_account_internal_group/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2022 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import logging


def pre_init_hook(env):
"""Precreate account_internal_group and fill with appropriate values to prevent
a MemoryError when the ORM attempts to call its compute method on a large
amount of preexisting moves."""
logger = logging.getLogger(__name__)
logger.info(
"Add account_move_line.account_internal_group column if it does not yet exist"
)
env.cr.execute(
"ALTER TABLE account_move_line ADD COLUMN IF NOT EXISTS "
"account_internal_group VARCHAR"
)
env.cr.execute(
""" UPDATE account_move_line aml0 SET account_internal_group = aa.account_type
FROM account_move_line aml
INNER JOIN account_account aa ON aa.id = aml.account_id
WHERE aml.id = aml0.id
AND aml.account_internal_group IS NULL
"""
)
logger.info("Finished adding account_move_line.account_internal_group column")
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_move_total_by_account_internal_group
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_asset
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_asset
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_asset
msgid "Amount Total Signed Account Internal Group Asset"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_equity
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_equity
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_equity
msgid "Amount Total Signed Account Internal Group Equity"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_expense
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_expense
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_expense
msgid "Amount Total Signed Account Internal Group Expense"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_income
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_income
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_income
msgid "Amount Total Signed Account Internal Group Income"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_liability
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_liability
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_liability
msgid "Amount Total Signed Account Internal Group Liability"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_bank_statement_line__amount_total_signed_account_internal_group_off_balance
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move__amount_total_signed_account_internal_group_off_balance
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_payment__amount_total_signed_account_internal_group_off_balance
msgid "Amount Total Signed Account Internal Group Off Balance"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,field_description:account_move_total_by_account_internal_group.field_account_move_line__account_internal_group
msgid "Internal Group"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model,name:account_move_total_by_account_internal_group.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model,name:account_move_total_by_account_internal_group.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model:ir.model.fields,help:account_move_total_by_account_internal_group.field_account_move_line__account_internal_group
msgid ""
"The 'Internal Group' is used to filter accounts based on the internal group "
"set on the account type."
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Asset"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Equity"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Expense"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Income"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Liability"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Off Balance"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Asset"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Equity"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Expense"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Income"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Liability"
msgstr ""

#. module: account_move_total_by_account_internal_group
#: model_terms:ir.ui.view,arch_db:account_move_total_by_account_internal_group.view_account_move_user_type_tree
msgid "Total Signed Off Balance"
msgstr ""
Loading