changeset 82fef152026e in modules/product_price_list:default
details:
https://hg.tryton.org/modules/product_price_list?cmd=changeset&node=82fef152026e
description:
Check rule only if _check_access is set and enforce companies rule
issue4080
review343891009
diffstat:
price_list.xml | 10 +++++-----
tests/test_product_price_list.py | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (41 lines):
diff -r 3477c5e12fba -r 82fef152026e price_list.xml
--- a/price_list.xml Sun Mar 07 11:13:53 2021 +0100
+++ b/price_list.xml Sat Apr 10 23:46:23 2021 +0200
@@ -54,16 +54,16 @@
<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">
diff -r 3477c5e12fba -r 82fef152026e tests/test_product_price_list.py
--- a/tests/test_product_price_list.py Sun Mar 07 11:13:53 2021 +0100
+++ b/tests/test_product_price_list.py Sat Apr 10 23:46:23 2021 +0200
@@ -7,10 +7,10 @@
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'