Check rule only if _check_access is set and enforce companies rule
issue4080
This commit is contained in:
parent
d99e17d938
commit
98dc3e50ec
|
@ -30,7 +30,7 @@
|
|||
</record>
|
||||
<record model="ir.rule" id="rule_analytic_account_line1">
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
||||
eval="[('internal_company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_analytic_account_line"/>
|
||||
</record>
|
||||
|
|
|
@ -11,11 +11,12 @@ from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
|||
from trytond.transaction import Transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
from trytond.modules.company.tests import create_company, set_company
|
||||
from trytond.modules.company.tests import (CompanyTestMixin, create_company,
|
||||
set_company)
|
||||
from trytond.modules.account.tests import create_chart, get_fiscalyear
|
||||
|
||||
|
||||
class TestCase(ModuleTestCase):
|
||||
class TestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'''
|
||||
Test module.
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue