Check rule only if _check_access is set and enforce companies rule
issue4080
This commit is contained in:
parent
6114d0b5b8
commit
c54a44c70d
|
@ -364,12 +364,12 @@ msgid "Wait"
|
|||
msgstr "En espera"
|
||||
|
||||
msgctxt "model:ir.rule.group,name:rule_group_production_operation"
|
||||
msgid "Rule Group Product Operation"
|
||||
msgstr "Grup de regles d'operació de producció"
|
||||
msgid "User in companies"
|
||||
msgstr "Usuari a les empreses"
|
||||
|
||||
msgctxt "model:ir.rule.group,name:rule_group_production_operation_tracking"
|
||||
msgid "Rule Group Production Operation Tracking"
|
||||
msgstr "Grup de regles de registre d'operació de producció"
|
||||
msgid "User in companies"
|
||||
msgstr "Usuari a les empreses"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:"
|
||||
msgid "Operation Types"
|
||||
|
|
|
@ -365,12 +365,12 @@ msgid "Wait"
|
|||
msgstr "Esperando"
|
||||
|
||||
msgctxt "model:ir.rule.group,name:rule_group_production_operation"
|
||||
msgid "Rule Group Product Operation"
|
||||
msgstr "Grupo de reglas de operación de producción"
|
||||
msgid "User in companies"
|
||||
msgstr "Usuario en las empresas"
|
||||
|
||||
msgctxt "model:ir.rule.group,name:rule_group_production_operation_tracking"
|
||||
msgid "Rule Group Production Operation Tracking"
|
||||
msgstr "Grupo de reglas de registro de operación de producción"
|
||||
msgid "User in companies"
|
||||
msgstr "Usuario en las empresas"
|
||||
|
||||
msgctxt "model:ir.ui.menu,name:"
|
||||
msgid "Operation Types"
|
||||
|
|
|
@ -84,13 +84,13 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_production_operation">
|
||||
<field name="name">Rule Group Product Operation</field>
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'production.operation')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_production_operation">
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_production_operation"/>
|
||||
</record>
|
||||
|
@ -177,13 +177,13 @@
|
|||
</record>
|
||||
|
||||
<record model="ir.rule.group" id="rule_group_production_operation_tracking">
|
||||
<field name="name">Rule Group Production Operation Tracking</field>
|
||||
<field name="name">User in companies</field>
|
||||
<field name="model" search="[('model', '=', 'production.operation.tracking')]"/>
|
||||
<field name="global_p" eval="True"/>
|
||||
</record>
|
||||
<record model="ir.rule" id="rule_production_operation_tracking">
|
||||
<field name="domain"
|
||||
eval="[('company', '=', Eval('user', {}).get('company', None))]"
|
||||
eval="[('company', 'in', Eval('companies', []))]"
|
||||
pyson="1"/>
|
||||
<field name="rule_group" ref="rule_group_production_operation_tracking"/>
|
||||
</record>
|
||||
|
|
|
@ -7,9 +7,10 @@ import trytond.tests.test_tryton
|
|||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import doctest_teardown
|
||||
from trytond.tests.test_tryton import doctest_checker
|
||||
from trytond.modules.company.tests import CompanyTestMixin
|
||||
|
||||
|
||||
class ProductionOperationTestCase(ModuleTestCase):
|
||||
class ProductionOperationTestCase(CompanyTestMixin, ModuleTestCase):
|
||||
'Test Production Operatoon module'
|
||||
module = 'production_operation'
|
||||
|
||||
|
|
Loading…
Reference in New Issue