-
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by AaronHForgeFlow
- Loading branch information
Showing
29 changed files
with
1,160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
========================================== | ||
Accounting Fincnaial Report Operating Unit | ||
========================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:80d5bfbe7975e098ed98cb9e4bd4eb363df2a871187f8e38cb097fba5104815d | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/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%2Foperating--unit-lightgray.png?logo=github | ||
:target: https://github.com/OCA/operating-unit/tree/17.0/account_financial_report_operating_unit | ||
:alt: OCA/operating-unit | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/operating-unit-17-0/operating-unit-17-0-account_financial_report_operating_unit | ||
: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/operating-unit&target_branch=17.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module add filter by operating units for all reports. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/operating-unit/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/operating-unit/issues/new?body=module:%20account_financial_report_operating_unit%0Aversion:%2017.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 | ||
------- | ||
|
||
* Ecosoft | ||
|
||
Contributors | ||
------------ | ||
|
||
- Kitti U. <[email protected]> | ||
- Aaron Henriquez <[email protected]> | ||
- Pimolnat Suntian <[email protected]> | ||
- Tran Thanh Trai <[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/operating-unit <https://github.com/OCA/operating-unit/tree/17.0/account_financial_report_operating_unit>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import report | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Accounting Fincnaial Report Operating Unit", | ||
"summary": "Introduces Operating Unit (OU) in financial reports", | ||
"version": "17.0.1.0.0", | ||
"author": "Ecosoft, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/operating-unit", | ||
"category": "Accounting & Finance", | ||
"depends": ["account_financial_report", "account_operating_unit"], | ||
"license": "AGPL-3", | ||
"data": [ | ||
"wizards/aged_partner_balance_wizard_view.xml", | ||
"wizards/general_ledger_wizard_view.xml", | ||
"wizards/journal_ledger_wizard_view.xml", | ||
"wizards/open_items_wizard_view.xml", | ||
"wizards/trial_balance_wizard_view.xml", | ||
"wizards/vat_report_wizard_view.xml", | ||
], | ||
} |
94 changes: 94 additions & 0 deletions
94
account_financial_report_operating_unit/i18n/account_financial_report_operating_unit.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * account_financial_report_operating_unit | ||
# | ||
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_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_aged_partner_balance | ||
msgid "Aged Partner Balance Report" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_aged_partner_balance_report_wizard | ||
msgid "Aged Partner Balance Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_general_ledger | ||
msgid "General Ledger Report" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_general_ledger_report_wizard | ||
msgid "General Ledger Report Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_journal_ledger | ||
msgid "Journal Ledger Report" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_journal_ledger_report_wizard | ||
msgid "Journal Ledger Report Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_open_items | ||
msgid "Open Items Report" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_open_items_report_wizard | ||
msgid "Open Items Report Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_aged_partner_balance_report_wizard__operating_unit_ids | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_general_ledger_report_wizard__operating_unit_ids | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_journal_ledger_report_wizard__operating_unit_ids | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_open_items_report_wizard__operating_unit_ids | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_trial_balance_report_wizard__operating_unit_ids | ||
#: model:ir.model.fields,field_description:account_financial_report_operating_unit.field_vat_report_wizard__operating_unit_ids | ||
msgid "Operating Unit" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model_terms:ir.ui.view,arch_db:account_financial_report_operating_unit.general_ledger_wizard | ||
msgid "Operating Units" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model_terms:ir.ui.view,arch_db:account_financial_report_operating_unit.journal_ledger_wizard | ||
msgid "Operating units" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_trial_balance | ||
msgid "Trial Balance Report" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_trial_balance_report_wizard | ||
msgid "Trial Balance Report Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_vat_report_wizard | ||
msgid "VAT Report Wizard" | ||
msgstr "" | ||
|
||
#. module: account_financial_report_operating_unit | ||
#: model:ir.model,name:account_financial_report_operating_unit.model_report_account_financial_report_vat_report | ||
msgid "Vat Report Report" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build-system] | ||
requires = ["whool"] | ||
build-backend = "whool.buildapi" |
4 changes: 4 additions & 0 deletions
4
account_financial_report_operating_unit/readme/CONTRIBUTORS.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Kitti U. \<<[email protected]>\> | ||
- Aaron Henriquez \<<[email protected]>\> | ||
- Pimolnat Suntian \<<[email protected]>\> | ||
- Tran Thanh Trai \<<[email protected]>\> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This module add filter by operating units for all reports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from . import aged_partner_balance | ||
from . import general_ledger | ||
from . import journal_ledger | ||
from . import open_items | ||
from . import trial_balance | ||
from . import vat_report |
24 changes: 24 additions & 0 deletions
24
account_financial_report_operating_unit/report/aged_partner_balance.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class AgedPartnerBalanceReport(models.AbstractModel): | ||
_inherit = "report.account_financial_report.aged_partner_balance" | ||
|
||
def _get_report_values(self, docids, data): | ||
self = self.with_context(operating_unit_ids=data["operating_unit_ids"]) | ||
return super()._get_report_values(docids, data) | ||
|
||
@api.model | ||
def _get_move_lines_domain_not_reconciled( | ||
self, company_id, account_ids, partner_ids, only_posted_moves, date_from | ||
): | ||
domain = super()._get_move_lines_domain_not_reconciled( | ||
company_id, account_ids, partner_ids, only_posted_moves, date_from | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain |
70 changes: 70 additions & 0 deletions
70
account_financial_report_operating_unit/report/general_ledger.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class GeneralLedgerReport(models.AbstractModel): | ||
_inherit = "report.account_financial_report.general_ledger" | ||
|
||
def _get_report_values(self, docids, data): | ||
self = self.with_context(operating_unit_ids=data["operating_unit_ids"]) | ||
return super()._get_report_values(docids, data) | ||
|
||
def _get_initial_balances_bs_ml_domain( | ||
self, account_ids, company_id, date_from, base_domain, grouped_by, acc_prt=False | ||
): | ||
domain = super()._get_initial_balances_bs_ml_domain( | ||
account_ids, company_id, date_from, base_domain, grouped_by, acc_prt=acc_prt | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain | ||
|
||
def _get_initial_balances_pl_ml_domain( | ||
self, account_ids, company_id, date_from, fy_start_date, base_domain | ||
): | ||
domain = super()._get_initial_balances_pl_ml_domain( | ||
account_ids, company_id, date_from, fy_start_date, base_domain | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain | ||
|
||
def _get_initial_balance_fy_pl_ml_domain( | ||
self, account_ids, company_id, fy_start_date, base_domain | ||
): | ||
domain = super()._get_initial_balance_fy_pl_ml_domain( | ||
account_ids, company_id, fy_start_date, base_domain | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain | ||
|
||
@api.model | ||
def _get_period_domain( | ||
self, | ||
account_ids, | ||
partner_ids, | ||
company_id, | ||
only_posted_moves, | ||
date_to, | ||
date_from, | ||
cost_center_ids, | ||
): | ||
domain = super()._get_period_domain( | ||
account_ids, | ||
partner_ids, | ||
company_id, | ||
only_posted_moves, | ||
date_to, | ||
date_from, | ||
cost_center_ids, | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain |
19 changes: 19 additions & 0 deletions
19
account_financial_report_operating_unit/report/journal_ledger.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import models | ||
|
||
|
||
class JournalLedgerReport(models.AbstractModel): | ||
_inherit = "report.account_financial_report.journal_ledger" | ||
|
||
def _get_report_values(self, docids, data): | ||
self = self.with_context(operating_unit_ids=data["operating_unit_ids"]) | ||
return super()._get_report_values(docids, data) | ||
|
||
def _get_move_lines_domain(self, move_ids, wizard, journal_ids): | ||
domain = super()._get_move_lines_domain(move_ids, wizard, journal_ids) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain |
36 changes: 36 additions & 0 deletions
36
account_financial_report_operating_unit/report/open_items.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, models | ||
|
||
|
||
class OpenItemsReport(models.AbstractModel): | ||
_inherit = "report.account_financial_report.open_items" | ||
|
||
def _get_report_values(self, docids, data): | ||
self = self.with_context(operating_unit_ids=data["operating_unit_ids"]) | ||
return super()._get_report_values(docids, data) | ||
|
||
@api.model | ||
def _get_move_lines_domain_not_reconciled( | ||
self, company_id, account_ids, partner_ids, only_posted_moves, date_from | ||
): | ||
domain = super()._get_move_lines_domain_not_reconciled( | ||
company_id, account_ids, partner_ids, only_posted_moves, date_from | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain | ||
|
||
@api.model | ||
def _get_new_move_lines_domain( | ||
self, new_ml_ids, account_ids, company_id, partner_ids, only_posted_moves | ||
): | ||
domain = super()._get_new_move_lines_domain( | ||
new_ml_ids, account_ids, company_id, partner_ids, only_posted_moves | ||
) | ||
operating_unit_ids = self.env.context.get("operating_unit_ids", []) | ||
if operating_unit_ids: | ||
domain.append(("operating_unit_id", "in", operating_unit_ids)) | ||
return domain |
Oops, something went wrong.