跳至内容
菜单
此问题已终结
2 回复
2563 查看

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')])
形象
丢弃
相关帖文 回复 查看 活动
1
9月 22
4357
0
4月 21
1776
1
5月 25
1110
1
4月 25
3567
1
3月 25
1217