From 5a9ba041db332d3d87019cf28b74b660ada2ded3 Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:43:55 +0300 Subject: [PATCH 1/9] TA#72320 [14.0][REM] Move account_report_line_menu, gitoo odoo-enterprise removed --- .docker_files/main/__manifest__.py | 3 +-- Dockerfile | 1 - gitoo.yml | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index 84e10da..c56bc48 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -33,7 +33,6 @@ "account_payment_term_usage_purchase", "account_payment_term_usage_sale", "account_payment_widget_link", - "account_report_line_menu", "account_report_trial_balance", "account_search_by_amount", "account_show_full_features", @@ -61,7 +60,7 @@ "old_accounts", "payment_list_not_sent", "payment_stripe_not_silenced", - "account_sale_invoice_date_required" + "account_sale_invoice_date_required", ], "installable": True, } diff --git a/Dockerfile b/Dockerfile index 83d3c81..46aeb39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,6 @@ COPY account_payment_term_usage /mnt/extra-addons/account_payment_term_usage COPY account_payment_term_usage_purchase /mnt/extra-addons/account_payment_term_usage_purchase COPY account_payment_term_usage_sale /mnt/extra-addons/account_payment_term_usage_sale COPY account_payment_widget_link /mnt/extra-addons/account_payment_widget_link -COPY account_report_line_menu /mnt/extra-addons/account_report_line_menu COPY account_report_trial_balance /mnt/extra-addons/account_report_trial_balance COPY account_sale_invoice_date_required /mnt/extra-addons/account_sale_invoice_date_required COPY account_search_by_amount /mnt/extra-addons/account_search_by_amount diff --git a/gitoo.yml b/gitoo.yml index 5b05143..fbdbb3f 100644 --- a/gitoo.yml +++ b/gitoo.yml @@ -1,6 +1,3 @@ -- url: https://{{GIT_TOKEN}}@github.com/Numigi/odoo-enterprise - branch: "14.0" - - url: https://github.com/Numigi/odoo-base-addons branch: "14.0" From 1b16dfcf9371175bfb6dc3b983d75f53b0fdc2c6 Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:55:41 +0300 Subject: [PATCH 2/9] Upgrade pytest-odoo to 2.1.1 --- .docker_files/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.docker_files/requirements.txt b/.docker_files/requirements.txt index 8800bdb..01fcd43 100644 --- a/.docker_files/requirements.txt +++ b/.docker_files/requirements.txt @@ -1,3 +1,4 @@ unidecode==1.0.23 odoo_test_helper stripe==4.1.0 +pytest-odoo==2.1.1 From 6d893967547eef252021984abd87d5815adbe41d Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 12:51:54 +0300 Subject: [PATCH 3/9] Update test_fr_translations.py --- .../tests/test_fr_translations.py | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index 9be15cd..98e0524 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -8,10 +8,12 @@ class TranslationCase(common.TransactionCase): def _find_translation(self, source, value): - return self.env['ir.translation'].search([ - ('src', '=', source), - ('value', '=', value), - ]) + return self.env['ir.translation'].search( + [ + ('src', '=', source), + ('value', '=', value), + ] + ) @ddt @@ -45,13 +47,14 @@ class TestAgedBalance(TranslationCase): def test_no_translation_found_with_wrong_term(self, data): assert not self._find_translation(data[0], data[1]) - @data( - ('Aged Receivable', 'Âge des comptes clients'), - ('Aged Payable', 'Âge des comptes fournisseurs'), - ('Aged Partner Balances', 'Âge des comptes'), - ) - def test_translations_found_with_correct_term(self, data): - assert self._find_translation(data[0], data[1]) + # Terms only available on account_reports in odoo-enterprise + # @data( + # ('Aged Receivable', 'Âge des comptes clients'), + # ('Aged Payable', 'Âge des comptes fournisseurs'), + # ('Aged Partner Balances', 'Âge des comptes'), + # ) + # def test_translations_found_with_correct_term(self, data): + # assert self._find_translation(data[0], data[1]) @ddt @@ -70,7 +73,8 @@ def test_no_translation_found_with_wrong_term(self, data): ('Reconcile', 'Réconcilier'), ('Unreconcile', 'Annuler la conciliation'), ('Reconciliation Models', 'Modèles de conciliation bancaire'), - ('Reconciliation', 'Conciliation'), + # Terms only available in enterprise version + # ('Reconciliation', 'Conciliation'), ) def test_translations_found_with_correct_term(self, data): assert self._find_translation(data[0], data[1]) From e7df6cebc3d76f85069bb61b294f532f50c35098 Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:21:11 +0300 Subject: [PATCH 4/9] Update test_fr_translations.py --- .../tests/test_fr_translations.py | 75 ++++++++++++++++--- 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index 98e0524..946a8ae 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -15,6 +15,23 @@ def _find_translation(self, source, value): ] ) + @staticmethod + def is_enterprise(env): + # List of modules exclusive to Odoo Enterprise + enterprise_modules = [ + 'web_enterprise', + 'hr_payroll', + 'account_accountant', + 'account_reports', + # Add more enterprise-specific modules as needed + ] + + # Check if any of the enterprise modules are installed + installed_modules = env['ir.module.module'].search( + [('name', 'in', enterprise_modules), ('state', '=', 'installed')] + ) + return bool(installed_modules) + @ddt class TestCreditNote(TranslationCase): @@ -48,13 +65,31 @@ def test_no_translation_found_with_wrong_term(self, data): assert not self._find_translation(data[0], data[1]) # Terms only available on account_reports in odoo-enterprise - # @data( - # ('Aged Receivable', 'Âge des comptes clients'), - # ('Aged Payable', 'Âge des comptes fournisseurs'), - # ('Aged Partner Balances', 'Âge des comptes'), - # ) - # def test_translations_found_with_correct_term(self, data): - # assert self._find_translation(data[0], data[1]) + @data( + ('Aged Receivable', 'Âge des comptes clients'), + ('Aged Payable', 'Âge des comptes fournisseurs'), + ('Aged Partner Balances', 'Âge des comptes'), + ) + def test_translations_found_with_correct_term(self, data): + if self.is_enterprise(): + assert self._find_translation(data[0], data[1]) + + # @classmethod + # def is_enterprise(cls): + # # List of modules exclusive to Odoo Enterprise + # enterprise_modules = [ + # 'web_enterprise', + # 'hr_payroll', + # 'account_accountant', + # 'account_reports', + # # Add more enterprise-specific modules as needed + # ] + + # # Check if any of the enterprise modules are installed + # installed_modules = cls.env['ir.module.module'].search( + # [('name', 'in', enterprise_modules), ('state', '=', 'installed')] + # ) + # return bool(installed_modules) @ddt @@ -74,10 +109,32 @@ def test_no_translation_found_with_wrong_term(self, data): ('Unreconcile', 'Annuler la conciliation'), ('Reconciliation Models', 'Modèles de conciliation bancaire'), # Terms only available in enterprise version - # ('Reconciliation', 'Conciliation'), + ('Reconciliation', 'Conciliation'), ) def test_translations_found_with_correct_term(self, data): - assert self._find_translation(data[0], data[1]) + term, translation = data + if term == 'Reconciliation': + if self.is_enterprise: + assert self._find_translation(term, translation) + else: + assert self._find_translation(term, translation) + + # @classmethod + # def is_enterprise(cls): + # # List of modules exclusive to Odoo Enterprise + # enterprise_modules = [ + # 'web_enterprise', + # 'hr_payroll', + # 'account_accountant', + # 'account_reports', + # # Add more enterprise-specific modules as needed + # ] + + # # Check if any of the enterprise modules are installed + # installed_modules = cls.env['ir.module.module'].search( + # [('name', 'in', enterprise_modules), ('state', '=', 'installed')] + # ) + # return bool(installed_modules) @ddt From 000e1cbc03a4484e0f728ed6df57a70dfb033aa7 Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:33:48 +0300 Subject: [PATCH 5/9] Update test_fr_translations.py --- account_fr_ca_labels/tests/test_fr_translations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index 946a8ae..1fbcc68 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -71,7 +71,7 @@ def test_no_translation_found_with_wrong_term(self, data): ('Aged Partner Balances', 'Âge des comptes'), ) def test_translations_found_with_correct_term(self, data): - if self.is_enterprise(): + if self.is_enterprise(self.env): assert self._find_translation(data[0], data[1]) # @classmethod @@ -114,7 +114,7 @@ def test_no_translation_found_with_wrong_term(self, data): def test_translations_found_with_correct_term(self, data): term, translation = data if term == 'Reconciliation': - if self.is_enterprise: + if self.is_enterprise(self.env): assert self._find_translation(term, translation) else: assert self._find_translation(term, translation) From cdb28fc4096cb5e6a7a211f7cc8638999f01ed5b Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:42:16 +0300 Subject: [PATCH 6/9] Update test_fr_translations.py --- .../tests/test_fr_translations.py | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index 1fbcc68..a8afbb0 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -74,23 +74,6 @@ def test_translations_found_with_correct_term(self, data): if self.is_enterprise(self.env): assert self._find_translation(data[0], data[1]) - # @classmethod - # def is_enterprise(cls): - # # List of modules exclusive to Odoo Enterprise - # enterprise_modules = [ - # 'web_enterprise', - # 'hr_payroll', - # 'account_accountant', - # 'account_reports', - # # Add more enterprise-specific modules as needed - # ] - - # # Check if any of the enterprise modules are installed - # installed_modules = cls.env['ir.module.module'].search( - # [('name', 'in', enterprise_modules), ('state', '=', 'installed')] - # ) - # return bool(installed_modules) - @ddt class TestReconciliation(TranslationCase): @@ -119,23 +102,6 @@ def test_translations_found_with_correct_term(self, data): else: assert self._find_translation(term, translation) - # @classmethod - # def is_enterprise(cls): - # # List of modules exclusive to Odoo Enterprise - # enterprise_modules = [ - # 'web_enterprise', - # 'hr_payroll', - # 'account_accountant', - # 'account_reports', - # # Add more enterprise-specific modules as needed - # ] - - # # Check if any of the enterprise modules are installed - # installed_modules = cls.env['ir.module.module'].search( - # [('name', 'in', enterprise_modules), ('state', '=', 'installed')] - # ) - # return bool(installed_modules) - @ddt class TestPayment(TranslationCase): From ce6fad683b5bd04b0f0df6e5c17d85688183e03f Mon Sep 17 00:00:00 2001 From: "Lanto R." <124650562+lanto-razafindrabe@users.noreply.github.com> Date: Sat, 23 Nov 2024 13:43:03 +0300 Subject: [PATCH 7/9] Update requirements.txt --- .docker_files/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/.docker_files/requirements.txt b/.docker_files/requirements.txt index 01fcd43..8800bdb 100644 --- a/.docker_files/requirements.txt +++ b/.docker_files/requirements.txt @@ -1,4 +1,3 @@ unidecode==1.0.23 odoo_test_helper stripe==4.1.0 -pytest-odoo==2.1.1 From c38c2923b21dd5186ea0c059143d832006ec1a55 Mon Sep 17 00:00:00 2001 From: majouda Date: Mon, 2 Dec 2024 19:04:04 -0500 Subject: [PATCH 8/9] revert changes in account_fr_ca_labels --- .../tests/test_fr_translations.py | 39 +++---------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index a8afbb0..9be15cd 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -8,29 +8,10 @@ class TranslationCase(common.TransactionCase): def _find_translation(self, source, value): - return self.env['ir.translation'].search( - [ - ('src', '=', source), - ('value', '=', value), - ] - ) - - @staticmethod - def is_enterprise(env): - # List of modules exclusive to Odoo Enterprise - enterprise_modules = [ - 'web_enterprise', - 'hr_payroll', - 'account_accountant', - 'account_reports', - # Add more enterprise-specific modules as needed - ] - - # Check if any of the enterprise modules are installed - installed_modules = env['ir.module.module'].search( - [('name', 'in', enterprise_modules), ('state', '=', 'installed')] - ) - return bool(installed_modules) + return self.env['ir.translation'].search([ + ('src', '=', source), + ('value', '=', value), + ]) @ddt @@ -64,15 +45,13 @@ class TestAgedBalance(TranslationCase): def test_no_translation_found_with_wrong_term(self, data): assert not self._find_translation(data[0], data[1]) - # Terms only available on account_reports in odoo-enterprise @data( ('Aged Receivable', 'Âge des comptes clients'), ('Aged Payable', 'Âge des comptes fournisseurs'), ('Aged Partner Balances', 'Âge des comptes'), ) def test_translations_found_with_correct_term(self, data): - if self.is_enterprise(self.env): - assert self._find_translation(data[0], data[1]) + assert self._find_translation(data[0], data[1]) @ddt @@ -91,16 +70,10 @@ def test_no_translation_found_with_wrong_term(self, data): ('Reconcile', 'Réconcilier'), ('Unreconcile', 'Annuler la conciliation'), ('Reconciliation Models', 'Modèles de conciliation bancaire'), - # Terms only available in enterprise version ('Reconciliation', 'Conciliation'), ) def test_translations_found_with_correct_term(self, data): - term, translation = data - if term == 'Reconciliation': - if self.is_enterprise(self.env): - assert self._find_translation(term, translation) - else: - assert self._find_translation(term, translation) + assert self._find_translation(data[0], data[1]) @ddt From bf0b6a4dd24192276c30e9a0c3197d1d12b49075 Mon Sep 17 00:00:00 2001 From: majouda Date: Fri, 6 Dec 2024 09:52:53 -0500 Subject: [PATCH 9/9] TA#72320 [14.0][IMO] Remove dependency with odoo-enterprise in UTs --- .docker_files/main/__manifest__.py | 3 ++- .../tests/test_fr_translations.py | 20 ------------------- gitoo.yml | 10 ++++++++++ 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.docker_files/main/__manifest__.py b/.docker_files/main/__manifest__.py index c56bc48..c5ef488 100644 --- a/.docker_files/main/__manifest__.py +++ b/.docker_files/main/__manifest__.py @@ -11,7 +11,6 @@ "category": "Other", "summary": "Install all addons required for testing.", "depends": [ - "account_accountant", # Used for testing account_fr_ca_labels "l10n_generic_coa", # Used for testing addons "account_additional_group", "account_analytic_required_forbidden", @@ -20,6 +19,7 @@ "account_closing_journal", "account_closing_journal_mis_builder", "account_closing_wizard", + "account_financial_report", # Used for testing account_fr_ca_labels "account_fiscalyear_end_on_company", "account_fr_ca_labels", "account_invoice_constraint_chronology_forced", @@ -33,6 +33,7 @@ "account_payment_term_usage_purchase", "account_payment_term_usage_sale", "account_payment_widget_link", + "account_reconciliation_widget", # Used for testing account_fr_ca_labels "account_report_trial_balance", "account_search_by_amount", "account_show_full_features", diff --git a/account_fr_ca_labels/tests/test_fr_translations.py b/account_fr_ca_labels/tests/test_fr_translations.py index 9be15cd..eb05e42 100644 --- a/account_fr_ca_labels/tests/test_fr_translations.py +++ b/account_fr_ca_labels/tests/test_fr_translations.py @@ -34,26 +34,6 @@ def test_translations_found_with_correct_term(self, data): assert self._find_translation(data[0], data[1]) -@ddt -class TestAgedBalance(TranslationCase): - - @data( - ('Aged Receivable', 'Balance agée clients'), - ('Aged Payable', 'Balance agée fournisseurs'), - ('Aged Partner Balances', 'Balances agées des tiers'), - ) - def test_no_translation_found_with_wrong_term(self, data): - assert not self._find_translation(data[0], data[1]) - - @data( - ('Aged Receivable', 'Âge des comptes clients'), - ('Aged Payable', 'Âge des comptes fournisseurs'), - ('Aged Partner Balances', 'Âge des comptes'), - ) - def test_translations_found_with_correct_term(self, data): - assert self._find_translation(data[0], data[1]) - - @ddt class TestReconciliation(TranslationCase): diff --git a/gitoo.yml b/gitoo.yml index fbdbb3f..af348f2 100644 --- a/gitoo.yml +++ b/gitoo.yml @@ -6,6 +6,16 @@ includes: - partner_affiliate_extended +- url: https://github.com/OCA/account-financial-reporting + branch: "14.0" + includes: + - account_financial_report + +- url: https://github.com/OCA/account-reconcile + branch: "14.0" + includes: + - account_reconciliation_widget + - url: https://github.com/OCA/mis-builder branch: "14.0" includes: