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

I am using odoo v10 and want to calculate the total absences from the attendance module and deduct the fixed amount for example $100 per absence  from his salary , I need someone to help me writing the python code on a salary rule get this result 

FOR EXAMPLE

if the employee did not mark his attendance the salary must be deducted and he will be considered as absent.

Ảnh đại diện
Huỷ bỏ
Tác giả
Do you have python code (function) to assign unpaid leave on attendance where the employee has not marked his attendance and there is no check in or check out time at the end of the day ! 
Thanks, Hilar Andikkadavath for your help ! 

On Sun, Oct 4, 2020 at 2:35 PM Hilar Andikkadavath <hilarak@gmail.com> wrote:

A new answer on python code to put on salary rule to calculate absences from attendance and deduct fixed amount from salary ( ODOO V10 ) has been posted. Click here to access the post :

See post


Sent by Odoo S.A. using Odoo.

Câu trả lời hay nhất

The attendance and payslip computations are not directly linked. If needed you have to do some customization. Either you can update the worked day inputs according to the attendance of current month. In ODOO default worked number of days are calculated according to the leaves.

The above mentioned code "result =-(contract.wage/31) * worked_days.Unpaid.number_of_days " is actually helpfull if you can create an unpaid leave in case of attendance is not registered by an employee. To achieve that you can create unpaid leave using a scheduled action which will run every day at the end of office hour, and create unpaid leave.

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

I want to calculate from the attendance sheet to deduct fixed amount for the days that there is no attendance is marked, If you can help me it would be very helpful and kind of you


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

Hi,

Can you try this code: result =-(contract.wage/31) * worked_days.Unpaid.number_of_days

See: Deduct Employee Salary When Taking Leaves In Odoo Payroll

Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Attendance Đã xử lý
2
thg 10 22
2818
1
thg 3 15
4380
0
thg 3 25
920
0
thg 1 25
3425
0
thg 12 24
1148