From ca9d4a3b6314ae95dfad5823b5aaec75642d5c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 10 Apr 2021 23:46:24 +0200 Subject: [PATCH] Check rule only if _check_access is set and enforce companies rule issue4080 review343891009 --- inventory.xml | 12 +++++++++ move.xml | 10 +++---- period.xml | 12 +++++++++ product.xml | 32 +++++++++++++++------- shipment.xml | 54 ++++++++++++++++++++------------------ stock_reporting_margin.xml | 48 +++++++++++++++++++++++++++++++++ tests/test_stock.py | 6 ++--- 7 files changed, 130 insertions(+), 44 deletions(-) diff --git a/inventory.xml b/inventory.xml index 730721e63e..7b3d887176 100644 --- a/inventory.xml +++ b/inventory.xml @@ -84,6 +84,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + diff --git a/move.xml b/move.xml index e85a9fb2d1..491536996d 100644 --- a/move.xml +++ b/move.xml @@ -94,16 +94,16 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + diff --git a/period.xml b/period.xml index 56b2ef4f6e..e9286c2966 100644 --- a/period.xml +++ b/period.xml @@ -34,6 +34,18 @@ this repository contains the full copyright notices and license terms. --> sequence="30" id="menu_period_list"/> + + User in companies + + + + + + + + diff --git a/product.xml b/product.xml index 548552c649..eecfc41080 100644 --- a/product.xml +++ b/product.xml @@ -77,6 +77,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + @@ -269,17 +281,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + @@ -370,17 +382,17 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + diff --git a/shipment.xml b/shipment.xml index 2962b88996..73fb7ec206 100644 --- a/shipment.xml +++ b/shipment.xml @@ -992,60 +992,64 @@ this repository contains the full copyright notices and license terms. --> - - User in company + + User in companies - + - + - - User in company + + + User in companies - + - + - - User in company + + + User in companies - + - + - - User in company + + + User in companies - + - + - - User in company + + + User in companies - + - + diff --git a/stock_reporting_margin.xml b/stock_reporting_margin.xml index f76a3b48bb..41ea402889 100644 --- a/stock_reporting_margin.xml +++ b/stock_reporting_margin.xml @@ -77,6 +77,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + @@ -153,6 +165,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + @@ -270,6 +294,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + @@ -346,6 +382,18 @@ this repository contains the full copyright notices and license terms. --> + + User in companies + + + + + + + + diff --git a/tests/test_stock.py b/tests/test_stock.py index 18a2826e19..23d58f523c 100644 --- a/tests/test_stock.py +++ b/tests/test_stock.py @@ -17,13 +17,11 @@ from trytond.exceptions import UserWarning, UserError from trytond.pool import Pool from trytond.modules.company.tests import ( - create_company, set_company, PartyCompanyCheckEraseMixin, - CompanyMultiValueTestMixin) + create_company, set_company, PartyCompanyCheckEraseMixin, CompanyTestMixin) class StockTestCase( - PartyCompanyCheckEraseMixin, CompanyMultiValueTestMixin, - ModuleTestCase): + PartyCompanyCheckEraseMixin, CompanyTestMixin, ModuleTestCase): 'Test Stock module' module = 'stock' longMessage = True