Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2584 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Above code is not working

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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')])
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 9 22
4363
0
thg 4 21
1795
1
thg 5 25
1141
1
thg 4 25
3575
1
thg 3 25
1218