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