Add check for default model access

When group access exists, a default model access should be defined otherwise
all access are given to non group users.

issue4485
review5941002
This commit is contained in:
Cédric Krier committed 2015-01-27 18:13:01 +01:00
1 parent e36b2ba3e5
commit 2b500dd6e8
2 files changed
+18 -17

No files matched your search

+15
View File
@@ -59,6 +59,13 @@ this repository contains the full copyright notices and license terms. -->
<field name="rule_group" ref="rule_group_mandate"/>
</record>
<record model="ir.model.access" id="access_mandate">
<field name="model" search="[('model', '=', 'account.payment.sepa.mandate')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_mandate_account_admin">
<field name="model" search="[('model', '=', 'account.payment.sepa.mandate')]"/>
<field name="group" ref="account.group_account_admin"/>
@@ -161,6 +168,14 @@ this repository contains the full copyright notices and license terms. -->
<field name="rule_group" ref="rule_group_message"/>
</record>
<record model="ir.model.access" id="access_message">
<field name="model"
search="[('model', '=', 'account.payment.sepa.message')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_message_account_admin">
<field name="model" search="[('model', '=', 'account.payment.sepa.message')]"/>
<field name="group" ref="account.group_account_admin"/>
+3 -17
View File
@@ -11,7 +11,7 @@ from io import BytesIO
from mock import Mock, patch
import trytond.tests.test_tryton
from trytond.tests.test_tryton import test_view, test_depends, test_menu_action
from trytond.tests.test_tryton import ModuleTestCase
from trytond.tests.test_tryton import DB_NAME, USER, CONTEXT
from trytond.transaction import Transaction
from trytond.exceptions import UserError
@@ -153,23 +153,9 @@ def validate_file(flavor, kind, xsd=None):
schema.assertValid(sepa_xml)
class AccountPaymentSepaTestCase(unittest.TestCase):
class AccountPaymentSepaTestCase(ModuleTestCase):
'Test Account Payment SEPA module'
def setUp(self):
trytond.tests.test_tryton.install_module('account_payment_sepa')
def test0005views(self):
'Test views'
test_view('account_payment_sepa')
def test0006depends(self):
'Test depends'
test_depends()
def test0007menu_actions(self):
'Test menu actions'
test_menu_action('account_payment_sepa')
module = 'account_payment_sepa'
def test_pain001_001_03(self):
'Test pain001.001.03 xsd validation'