mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-12-23 12:51:46 +00:00
30 lines
998 B
Python
30 lines
998 B
Python
# © 2021 Tobias Zehntner
|
|
# © 2021 Niboo SRL (https://www.niboo.com/)
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
|
|
|
|
|
from flectra import exceptions
|
|
|
|
from .test_partner_relation_common import TestPartnerRelationCommon
|
|
|
|
|
|
class TestPartnerRelationAction(TestPartnerRelationCommon):
|
|
def setUp(self):
|
|
super().setUp()
|
|
self.user = self.env["res.users"].create(
|
|
{
|
|
"login": "test_partner_action_user",
|
|
"name": "test_partner_action_user",
|
|
"groups_id": [
|
|
(4, self.env.ref("base.group_user").id),
|
|
],
|
|
}
|
|
)
|
|
|
|
def test_call_relation_action(self):
|
|
"""Test calling relations action. Should be possible with simple user rights"""
|
|
try:
|
|
self.partner_01_person.with_user(self.user).action_view_relations()
|
|
except exceptions.AccessError:
|
|
self.fail("action_view_relations() raised AccessError unexpectedly!")
|