From 0d9218c7d22a5a2a4eeb0ccfe93618efdb930963 Mon Sep 17 00:00:00 2001 From: Saran440 Date: Wed, 26 Feb 2025 11:07:50 +0700 Subject: [PATCH 1/4] [IMP] account_financial_report_operating_unit: add OU in abstract model --- .../wizards/__init__.py | 8 +------- ...{vat_report_wizard.py => abstract_wizard.py} | 10 +++++----- .../wizards/aged_partner_balance_wizard.py | 17 ----------------- .../wizards/general_ledger_wizard.py | 17 ----------------- .../wizards/journal_ledger_wizard.py | 17 ----------------- .../wizards/journal_ledger_wizard_view.xml | 6 ++---- .../wizards/open_items_wizard.py | 17 ----------------- .../wizards/trial_balance_wizard.py | 17 ----------------- 8 files changed, 8 insertions(+), 101 deletions(-) rename account_financial_report_operating_unit/wizards/{vat_report_wizard.py => abstract_wizard.py} (54%) delete mode 100644 account_financial_report_operating_unit/wizards/aged_partner_balance_wizard.py delete mode 100644 account_financial_report_operating_unit/wizards/general_ledger_wizard.py delete mode 100644 account_financial_report_operating_unit/wizards/journal_ledger_wizard.py delete mode 100644 account_financial_report_operating_unit/wizards/open_items_wizard.py delete mode 100644 account_financial_report_operating_unit/wizards/trial_balance_wizard.py diff --git a/account_financial_report_operating_unit/wizards/__init__.py b/account_financial_report_operating_unit/wizards/__init__.py index f356c6015e..fbdb1c8f12 100644 --- a/account_financial_report_operating_unit/wizards/__init__.py +++ b/account_financial_report_operating_unit/wizards/__init__.py @@ -1,9 +1,3 @@ -# 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_wizard -from . import general_ledger_wizard -from . import journal_ledger_wizard -from . import open_items_wizard -from . import trial_balance_wizard -from . import vat_report_wizard +from . import abstract_wizard diff --git a/account_financial_report_operating_unit/wizards/vat_report_wizard.py b/account_financial_report_operating_unit/wizards/abstract_wizard.py similarity index 54% rename from account_financial_report_operating_unit/wizards/vat_report_wizard.py rename to account_financial_report_operating_unit/wizards/abstract_wizard.py index 19c4c08766..b14f65e94e 100644 --- a/account_financial_report_operating_unit/wizards/vat_report_wizard.py +++ b/account_financial_report_operating_unit/wizards/abstract_wizard.py @@ -1,17 +1,17 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) +# Copyright 2025 Ecosoft Co., Ltd. (http://ecosoft.co.th) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models -class VATReportWizard(models.TransientModel): - _inherit = "vat.report.wizard" +class AbstractWizard(models.AbstractModel): + _inherit = "account_financial_report_abstract_wizard" operating_unit_ids = fields.Many2many( comodel_name="operating.unit", ) - def _prepare_vat_report(self): - res = super()._prepare_vat_report() + def _prepare_report_data(self): + res = super()._prepare_report_data() res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) return res diff --git a/account_financial_report_operating_unit/wizards/aged_partner_balance_wizard.py b/account_financial_report_operating_unit/wizards/aged_partner_balance_wizard.py deleted file mode 100644 index 23bf811afc..0000000000 --- a/account_financial_report_operating_unit/wizards/aged_partner_balance_wizard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class AgedPartnerBalanceWizard(models.TransientModel): - _inherit = "aged.partner.balance.report.wizard" - - operating_unit_ids = fields.Many2many( - comodel_name="operating.unit", - ) - - def _prepare_report_aged_partner_balance(self): - res = super()._prepare_report_aged_partner_balance() - res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) - return res diff --git a/account_financial_report_operating_unit/wizards/general_ledger_wizard.py b/account_financial_report_operating_unit/wizards/general_ledger_wizard.py deleted file mode 100644 index 80c53bc68c..0000000000 --- a/account_financial_report_operating_unit/wizards/general_ledger_wizard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class GeneralLedgerReportWizard(models.TransientModel): - _inherit = "general.ledger.report.wizard" - - operating_unit_ids = fields.Many2many( - comodel_name="operating.unit", - ) - - def _prepare_report_general_ledger(self): - res = super()._prepare_report_general_ledger() - res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) - return res diff --git a/account_financial_report_operating_unit/wizards/journal_ledger_wizard.py b/account_financial_report_operating_unit/wizards/journal_ledger_wizard.py deleted file mode 100644 index dac557e534..0000000000 --- a/account_financial_report_operating_unit/wizards/journal_ledger_wizard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class JournalLedgerReportWizard(models.TransientModel): - _inherit = "journal.ledger.report.wizard" - - operating_unit_ids = fields.Many2many( - comodel_name="operating.unit", - ) - - def _prepare_report_journal_ledger(self): - res = super()._prepare_report_journal_ledger() - res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) - return res diff --git a/account_financial_report_operating_unit/wizards/journal_ledger_wizard_view.xml b/account_financial_report_operating_unit/wizards/journal_ledger_wizard_view.xml index 11cb4a7a51..211af24f9f 100644 --- a/account_financial_report_operating_unit/wizards/journal_ledger_wizard_view.xml +++ b/account_financial_report_operating_unit/wizards/journal_ledger_wizard_view.xml @@ -1,12 +1,11 @@ - Journal Ledger journal.ledger.report.wizard -
+ -
+
-
diff --git a/account_financial_report_operating_unit/wizards/open_items_wizard.py b/account_financial_report_operating_unit/wizards/open_items_wizard.py deleted file mode 100644 index 60f6bdbfb0..0000000000 --- a/account_financial_report_operating_unit/wizards/open_items_wizard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class OpenItemsReportWizard(models.TransientModel): - _inherit = "open.items.report.wizard" - - operating_unit_ids = fields.Many2many( - comodel_name="operating.unit", - ) - - def _prepare_report_open_items(self): - res = super()._prepare_report_open_items() - res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) - return res diff --git a/account_financial_report_operating_unit/wizards/trial_balance_wizard.py b/account_financial_report_operating_unit/wizards/trial_balance_wizard.py deleted file mode 100644 index 3333cc56fb..0000000000 --- a/account_financial_report_operating_unit/wizards/trial_balance_wizard.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class TrialBalanceReportWizard(models.TransientModel): - _inherit = "trial.balance.report.wizard" - - operating_unit_ids = fields.Many2many( - comodel_name="operating.unit", - ) - - def _prepare_report_trial_balance(self): - res = super()._prepare_report_trial_balance() - res.update({"operating_unit_ids": self.operating_unit_ids.ids or []}) - return res From 03478aaf2e4ba2114507e2b962053f5d1206486a Mon Sep 17 00:00:00 2001 From: oca-ci Date: Thu, 27 Feb 2025 09:33:32 +0000 Subject: [PATCH 2/4] [UPD] Update account_financial_report_operating_unit.pot --- ...ccount_financial_report_operating_unit.pot | 34 +++---------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/account_financial_report_operating_unit/i18n/account_financial_report_operating_unit.pot b/account_financial_report_operating_unit/i18n/account_financial_report_operating_unit.pot index fba70e29ad..1a0ef77907 100644 --- a/account_financial_report_operating_unit/i18n/account_financial_report_operating_unit.pot +++ b/account_financial_report_operating_unit/i18n/account_financial_report_operating_unit.pot @@ -14,13 +14,13 @@ msgstr "" "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" +#: model:ir.model,name:account_financial_report_operating_unit.model_account_financial_report_abstract_wizard +msgid "Abstract Wizard" 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" +#: 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 @@ -28,32 +28,18 @@ msgstr "" 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_account_financial_report_abstract_wizard__operating_unit_ids #: 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 @@ -78,16 +64,6 @@ msgstr "" 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" From 34e5c4a6b05d044a01be9405a9236104e7d1bc95 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Thu, 27 Feb 2025 09:38:52 +0000 Subject: [PATCH 3/4] [BOT] post-merge updates --- README.md | 2 +- account_financial_report_operating_unit/README.rst | 2 +- account_financial_report_operating_unit/__manifest__.py | 2 +- .../static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 104210c70b..ddfedf43c9 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ addon | version | maintainers | summary --- | --- | --- | --- [account_asset_operating_unit](account_asset_operating_unit/) | 15.0.1.0.0 | [![ps-tubtim](https://github.com/ps-tubtim.png?size=30px)](https://github.com/ps-tubtim) | This module adds operating unit information to assets. [account_asset_transfer_operating_unit](account_asset_transfer_operating_unit/) | 15.0.1.0.0 | [![Saran440](https://github.com/Saran440.png?size=30px)](https://github.com/Saran440) | Add operating unit to asset transfer -[account_financial_report_operating_unit](account_financial_report_operating_unit/) | 15.0.1.0.0 | | Introduces Operating Unit (OU) in financial reports +[account_financial_report_operating_unit](account_financial_report_operating_unit/) | 15.0.1.1.0 | | Introduces Operating Unit (OU) in financial reports [account_operating_unit](account_operating_unit/) | 15.0.1.3.0 | | Introduces Operating Unit (OU) in invoices and Accounting Entries with clearing account [account_operating_unit_access_all](account_operating_unit_access_all/) | 15.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Access all OUs' Accounting [analytic_operating_unit](analytic_operating_unit/) | 15.0.1.0.1 | | Analytic Operating Unit diff --git a/account_financial_report_operating_unit/README.rst b/account_financial_report_operating_unit/README.rst index 5c129ebb94..d83e156cfa 100644 --- a/account_financial_report_operating_unit/README.rst +++ b/account_financial_report_operating_unit/README.rst @@ -7,7 +7,7 @@ Accounting Financial Report Operating Unit !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:bc3297ecdd05c28b637bc25620ee3e09e64d0b748c8180c2f08775f4341f141e + !! source digest: sha256:9859bfe6eaee701a126438b77acd4118fede02657ad97961270afcee8eeacd8b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/account_financial_report_operating_unit/__manifest__.py b/account_financial_report_operating_unit/__manifest__.py index 685fdfe629..1d83a76c3a 100644 --- a/account_financial_report_operating_unit/__manifest__.py +++ b/account_financial_report_operating_unit/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Accounting Financial Report Operating Unit", "summary": "Introduces Operating Unit (OU) in financial reports", - "version": "15.0.1.0.0", + "version": "15.0.1.1.0", "author": "Ecosoft, Odoo Community Association (OCA)", "website": "https://github.com/OCA/operating-unit", "category": "Accounting & Finance", diff --git a/account_financial_report_operating_unit/static/description/index.html b/account_financial_report_operating_unit/static/description/index.html index f88135212e..fb2c1d6817 100644 --- a/account_financial_report_operating_unit/static/description/index.html +++ b/account_financial_report_operating_unit/static/description/index.html @@ -367,7 +367,7 @@

Accounting Financial Report Operating Unit

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:bc3297ecdd05c28b637bc25620ee3e09e64d0b748c8180c2f08775f4341f141e +!! source digest: sha256:9859bfe6eaee701a126438b77acd4118fede02657ad97961270afcee8eeacd8b !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/operating-unit Translate me on Weblate Try me on Runboat

This module add filter by operating units for all reports.

From d8da7605405afd5b86bef1e64c9bd67bb409fc91 Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 27 Feb 2025 09:39:02 +0000 Subject: [PATCH 4/4] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: operating-unit-15.0/operating-unit-15.0-account_financial_report_operating_unit Translate-URL: https://translation.odoo-community.org/projects/operating-unit-15-0/operating-unit-15-0-account_financial_report_operating_unit/ --- .../i18n/es.po | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/account_financial_report_operating_unit/i18n/es.po b/account_financial_report_operating_unit/i18n/es.po index a827e7c102..a176884189 100644 --- a/account_financial_report_operating_unit/i18n/es.po +++ b/account_financial_report_operating_unit/i18n/es.po @@ -16,47 +16,33 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 5.6.2\n" +#. module: account_financial_report_operating_unit +#: model:ir.model,name:account_financial_report_operating_unit.model_account_financial_report_abstract_wizard +msgid "Abstract Wizard" +msgstr "" + #. 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 "Informe de Calidad de deuda" -#. 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 "Informe del libro mayor" -#. 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 "Informe del libro diario" -#. 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 "Informe de efectos abiertos" #. 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_account_financial_report_abstract_wizard__operating_unit_ids #: 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 @@ -81,16 +67,6 @@ msgstr "Unidades operativas" msgid "Trial Balance Report" msgstr "Balance de sumas y saldos" -#. 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"