1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/l10n_lt_hr_payroll/models/res_users.py
2024-12-10 09:04:09 +07:00

24 lines
635 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
L10N_LT_PAYROLL_WRITABLE_FIELDS = [
'l10n_lt_working_capacity',
]
class User(models.Model):
_inherit = ['res.users']
l10n_lt_working_capacity = fields.Selection(related='employee_ids.l10n_lt_working_capacity', readonly=False)
@property
def SELF_READABLE_FIELDS(self):
return super().SELF_READABLE_FIELDS + L10N_LT_PAYROLL_WRITABLE_FIELDS
@property
def SELF_WRITEABLE_FIELDS(self):
return super().SELF_WRITEABLE_FIELDS + L10N_LT_PAYROLL_WRITABLE_FIELDS