[IMP] web_disable_export_group: Disable 'export all' button

This commit is contained in:
Alexandre D. Díaz
2021-07-07 19:30:52 +02:00
committed by David
parent 0b18c9843e
commit 6a8951581d
7 changed files with 75 additions and 21 deletions

View File

@@ -5,8 +5,28 @@ import odoo.tests
@odoo.tests.tagged("post_install", "-at_install")
class TestTour(odoo.tests.HttpCase):
def setUp(self):
super().setUp()
self.env["res.users"].create(
{
"name": "user_not_export",
"login": "user_not_export",
"password": "user_not_export",
"groups_id": [
(
6,
0,
[
self.env.ref("base.group_user").id,
self.env.ref("base.group_system").id,
],
)
],
}
)
def test_admin(self):
self.start_tour("/web", "export_tour_admin", login="admin")
def test_demo(self):
self.start_tour("/web", "export_tour_demo", login="demo")
def test_user_not_export(self):
self.start_tour("/web", "export_tour_demo", login="user_not_export")