Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
2578 Представления

How to setup a state named onhold in payroll process along with draft and done because we need salary of few employees on hold. Suppose if an employee going to relieve by next month end, we will hold this month and settle the entire amount in next month.

Help us hos to handle this scenario

Аватар
Отменить
Автор Лучший ответ

Above code is not working

Аватар
Отменить
Лучший ответ

Inherit the model hr.payslip and you can add the new value to the state field, add below code in the Python side and do necessary changes in the views like adding button to control this state etc


class HrPayslip(models.Model):
_inherit = 'hr.payslip'

state = fields.Selection(
selection_add=[('hold', 'On Hold')])
Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
сент. 22
4363
0
апр. 21
1790
1
мая 25
1134
1
апр. 25
3575
1
мар. 25
1218