diff --git a/document_page_tags/hooks.py b/document_page_tags/hooks.py index a68dfe54..fdd8fcbb 100644 --- a/document_page_tags/hooks.py +++ b/document_page_tags/hooks.py @@ -37,6 +37,7 @@ def populate_tags(cr, column): env = Environment(cr, SUPERUSER_ID, {}) document_page_tag = env['document.page.tag'] document_page = env['document.page'] + # pylint: disable=E8103 cr.execute( 'SELECT %s, ARRAY_AGG(id) from %s WHERE %s IS NOT NULL GROUP BY %s' % ( column, env['document.page']._table, column, column)) diff --git a/document_page_tags/security/ir.model.access.csv b/document_page_tags/security/ir.model.access.csv index f9dce761..0a0d36a0 100644 --- a/document_page_tags/security/ir.model.access.csv +++ b/document_page_tags/security/ir.model.access.csv @@ -1,3 +1,3 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -access_document_page_tag,access_document_page_tag,model_document_page_tag,,1,0,0,0 +access_document_page_tag_all,access_document_page_tag,model_document_page_tag,,1,0,0,0 access_document_page_tag,access_document_page_tag,model_document_page_tag,base.group_user,1,1,1,1 diff --git a/document_page_tags/tests/test_document_page_tags.py b/document_page_tags/tests/test_document_page_tags.py index 5a1c2752..3b6251b9 100644 --- a/document_page_tags/tests/test_document_page_tags.py +++ b/document_page_tags/tests/test_document_page_tags.py @@ -20,6 +20,7 @@ from psycopg2 import IntegrityError from openerp.tests.common import TransactionCase from ..hooks import post_init_hook +from openerp.tools.misc import mute_logger class TestDocumentPageTags(TransactionCase): @@ -28,5 +29,6 @@ class TestDocumentPageTags(TransactionCase): post_init_hook(self.cr, self.registry) # check we can't create nonunique tags with self.assertRaises(IntegrityError): - self.env['document.page.tag'].name_create('test') - self.env['document.page.tag'].name_create('test') + with mute_logger('openerp.sql_db'): + self.env['document.page.tag'].name_create('test') + self.env['document.page.tag'].name_create('test')