mirror of
https://github.com/NaN-tic/trytond-analytic_line_state.git
synced 2023-12-14 03:33:02 +01:00
Check rule only if _check_access is set and enforce companies rule
issue4080
This commit is contained in:
parent
d99e17d938
commit
98dc3e50ec
2 changed files with 4 additions and 3 deletions
|
@ -30,7 +30,7 @@
|
||||||
</record>
|
</record>
|
||||||
<record model="ir.rule" id="rule_analytic_account_line1">
|
<record model="ir.rule" id="rule_analytic_account_line1">
|
||||||
<field name="domain"
|
<field name="domain"
|
||||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
eval="[('internal_company', 'in', Eval('companies', []))]"
|
||||||
pyson="1"/>
|
pyson="1"/>
|
||||||
<field name="rule_group" ref="rule_group_analytic_account_line"/>
|
<field name="rule_group" ref="rule_group_analytic_account_line"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
|
@ -11,11 +11,12 @@ from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pool import Pool
|
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
|
from trytond.modules.account.tests import create_chart, get_fiscalyear
|
||||||
|
|
||||||
|
|
||||||
class TestCase(ModuleTestCase):
|
class TestCase(CompanyTestMixin, ModuleTestCase):
|
||||||
'''
|
'''
|
||||||
Test module.
|
Test module.
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue