Odoo18-Base/addons/website_hr_recruitment/models/hr_department.py
2025-03-10 11:12:23 +07:00

15 lines
407 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class Department(models.Model):
_inherit = 'hr.department'
def name_get(self):
# Get department name using superuser, because model is not accessible
# for portal users
self_sudo = self.sudo()
return super(Department, self_sudo).name_get()