Skip to Content
Menu
This question has been flagged
634 Views

Hi, 

I am working in the function that Deducts from salary if the employee tack leaves during the trial period, so I want to calculate the percentage of the deduction.

here's the code:


@api.depends('employee_id', 'holiday_status_id','number_of_days_display')
def get_adversary_wage(self):
for rec in self:
if not rec.holiday_status_id.after_trial_period:
print("wooooooooow")
currentMonth = datetime.now().month
print("faaaaaal")
rec.wage_adversary_percentage = rec.number_of_days_display/datetime.now().month




Avatar
Discard
Related Posts Replies Views Activity
2
Dec 23
12010
0
Oct 23
33
3
Oct 23
787
1
Oct 23
569
1
Aug 23
982