mirror of
https://github.com/NaN-tic/trytond-commission_manager.git
synced 2023-12-14 04:03:00 +01:00
Check rule only if _check_access is set and enforce companies rule
issue4080
This commit is contained in:
parent
a13f67c8e7
commit
6b9fbb3b78
2 changed files with 3 additions and 2 deletions
|
@ -89,7 +89,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
</record>
|
||||
<record model="ir.rule" id="rule_commission_manager1">
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_commission_manager"/>
|
||||
</record>
|
||||
|
|
|
@ -7,9 +7,10 @@ from trytond.tests.test_tryton import ModuleTestCase
|
|||
from trytond.tests.test_tryton import suite as test_suite
|
||||
from trytond.tests.test_tryton import doctest_setup, doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
from trytond.modules.company.tests import CompanyTestMixin
|
||||
|
||||
|
||||
class CommissionManagerTestCase(ModuleTestCase):
|
||||
class CommissionManagerTestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'Test Commission Manager module'
|
||||
module = 'commission_manager'
|
||||
|
||||
|
|
Loading…
Reference in a new issue