From a9236ca5d3a6fc94b009f892ab5b43713be7fc66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Apr 2021 23:46:23 +0200 Subject: [PATCH] Check rule only if _check_access is set and enforce companies rule issue4080 review343891009 --- account.xml | 60 +++++++++++++++++++++---------------------- fiscalyear.xml | 10 ++++---- move.xml | 39 ++++++++++++++++++++++++++++ move_template.xml | 13 ++++++++++ period.xml | 10 ++++---- tax.xml | 30 +++++++++++----------- tests/test_account.py | 6 ++--- 7 files changed, 109 insertions(+), 59 deletions(-) diff --git a/account.xml b/account.xml index 9a1ec511cf..6767c88c7b 100644 --- a/account.xml +++ b/account.xml @@ -210,17 +210,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -488,16 +488,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -591,17 +591,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -673,17 +673,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -712,17 +712,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -852,16 +852,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + diff --git a/fiscalyear.xml b/fiscalyear.xml index 28491c6558..302bfddb65 100644 --- a/fiscalyear.xml +++ b/fiscalyear.xml @@ -85,16 +85,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + diff --git a/move.xml b/move.xml index 3ff8b0eac5..eac402d27b 100644 --- a/move.xml +++ b/move.xml @@ -39,6 +39,19 @@ this repository contains the full copyright notices and license terms. --> sequence="50" id="menu_move_form"/> + + User in companies + + + + + + + + @@ -105,6 +118,19 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + @@ -371,6 +397,19 @@ this repository contains the full copyright notices and license terms. --> sequence="20" id="menu_reconcile_writeoff_form"/> + + User in companies + + + + + + + + diff --git a/move_template.xml b/move_template.xml index 784e2f6d8a..4336a385eb 100644 --- a/move_template.xml +++ b/move_template.xml @@ -38,6 +38,19 @@ this repository contains the full copyright notices and license terms. --> sequence="10" id="menu_move_template_form"/> + + User in companies + + + + + + + + diff --git a/period.xml b/period.xml index 6f0b2e5b2d..4131f2af29 100644 --- a/period.xml +++ b/period.xml @@ -88,16 +88,16 @@ this repository contains the full copyright notices and license terms. --> sequence="30" id="menu_close_period"/> - - User in company + + User in companies - + - + diff --git a/tax.xml b/tax.xml index 104144e556..6f9fd86f29 100644 --- a/tax.xml +++ b/tax.xml @@ -200,16 +200,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -333,16 +333,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -497,16 +497,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + diff --git a/tests/test_account.py b/tests/test_account.py index 63954cfef7..653678d7f5 100644 --- a/tests/test_account.py +++ b/tests/test_account.py @@ -15,8 +15,7 @@ from trytond.exceptions import UserError from trytond.modules.account.tax import TaxableMixin from trytond.modules.company.tests import ( - create_company, set_company, PartyCompanyCheckEraseMixin, - CompanyMultiValueTestMixin) + create_company, set_company, PartyCompanyCheckEraseMixin, CompanyTestMixin) from trytond.modules.currency.tests import create_currency @@ -174,8 +173,7 @@ def close_fiscalyear(fiscalyear): class AccountTestCase( - PartyCompanyCheckEraseMixin, CompanyMultiValueTestMixin, - ModuleTestCase): + PartyCompanyCheckEraseMixin, CompanyTestMixin, ModuleTestCase): 'Test Account module' module = 'account'