Check rule only if _check_access is set and enforce companies rule
issue4080 review343891009
This commit is contained in:
1 parent
e685c40ec2
commit
df218755a1
2 files changed
+7
-7
No files matched your search
+5
-5
@@ -54,16 +54,16 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="perm_delete" eval="True"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_product_list">
|
||||
<field name="name">User in company</field>
|
||||
<record model="ir.rule.group" id="rule_group_price_list_companies">
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'product.price_list')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_product_list1">
|
||||
<record model="ir.rule" id="rule_price_list_companies">
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_product_list"/>
|
||||
<field name="rule_group" ref="rule_group_price_list_companies"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="price_list_line_view_form">
|
||||
|
||||
@@ -7,10 +7,10 @@ from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
from trytond.pool import Pool
|
||||
|
||||
from trytond.modules.company.tests import (
|
||||
create_company, set_company, CompanyMultiValueTestMixin)
|
||||
create_company, set_company, CompanyTestMixin)
|
||||
|
||||
|
||||
class ProductPriceListTestCase(CompanyMultiValueTestMixin, ModuleTestCase):
|
||||
class ProductPriceListTestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'Test ProductPriceList module'
|
||||
module = 'product_price_list'
|
||||
|
||||
|
||||
Reference in new issue
Block a user