You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
995 B

  1. # © 2021 Tobias Zehntner
  2. # © 2021 Niboo SRL (https://www.niboo.com/)
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from odoo import exceptions
  5. from .test_partner_relation_common import TestPartnerRelationCommon
  6. class TestPartnerRelationAction(TestPartnerRelationCommon):
  7. def setUp(self):
  8. super().setUp()
  9. self.user = self.env["res.users"].create(
  10. {
  11. "login": "test_partner_action_user",
  12. "name": "test_partner_action_user",
  13. "groups_id": [
  14. (4, self.env.ref("base.group_user").id),
  15. ],
  16. }
  17. )
  18. def test_call_relation_action(self):
  19. """Test calling relations action. Should be possible with simple user rights"""
  20. try:
  21. self.partner_01_person.with_user(self.user).action_view_relations()
  22. except exceptions.AccessError:
  23. self.fail("action_view_relations() raised AccessError unexpectedly!")