It was no longer possible to load the My Profile for users with an employee that were not HR Officer. In the `get_views()` method, the 'search' view was requested after the 'form', thus it omited the fields requested as SUPERUSER in `get_view()`. closes odoo/odoo#99750 Signed-off-by: Kevin Baptiste <kba@odoo.com>
18 lines
571 B
Python
18 lines
571 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo.tests import HttpCase, tagged, new_test_user
|
|
|
|
@tagged('-at_install', 'post_install')
|
|
class TestEmployeeUi(HttpCase):
|
|
def test_employee_profile_tour(self):
|
|
user = new_test_user(self.env, login='davidelora', groups='base.group_user')
|
|
|
|
self.env['hr.employee'].create([{
|
|
'name': 'Johnny H.',
|
|
}, {
|
|
'name': 'David Elora',
|
|
'user_id': user.id,
|
|
}])
|
|
|
|
self.start_tour("/web", 'hr_employee_tour', login="davidelora")
|