Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Please Complete your Question where ,Which module? Then only answer your question
I create a module name attendance........ Inside it i create attendance.py file. code is: def attendance_percentage(self): res = {} for attendance_sheet_data in self: att_count = 0 percentage = 0.0 if attendance_sheet_data.one==True: att_count=att_count+1 if attendance_sheet_data.two==True: att_count=att_count+1 if attendance_sheet_data.three==True: att_count=att_count+1 if attendance_sheet_data.four==True: att_count=att_count+1 if attendance_sheet_data.five==True: att_count=att_count+1 if attendance_sheet_data.six==True: att_count=att_count+1 if attendance_sheet_data.seven==True: att_count=att_count+1 if attendance_sheet_data.eight==True: att_count=att_count+1 if attendance_sheet_data.nine==True: att_count=att_count+1 if attendance_sheet_data.ten==True: att_count=att_count+1 if attendance_sheet_data.one_1==True: att_count=att_count+1 if attendance_sheet_data.one_2==True: att_count=att_count+1 if attendance_sheet_data.one_3==True: att_count=att_count+1 if attendance_sheet_data.one_4==True: att_count=att_count+1 if attendance_sheet_data.one_5==True: att_count=att_count+1 if attendance_sheet_data.one_6==True: att_count=att_count+1 if attendance_sheet_data.one_7==True: att_count=att_count+1 if attendance_sheet_data.one_8==True: att_count=att_count+1 if attendance_sheet_data.one_9==True: att_count=att_count+1 if attendance_sheet_data.one_0==True: att_count=att_count+1 if attendance_sheet_data.two_1==True: att_count=att_count+1 if attendance_sheet_data.two_2==True: att_count=att_count+1 if attendance_sheet_data.two_3==True: att_count=att_count+1 if attendance_sheet_data.two_4==True: att_count=att_count+1 if attendance_sheet_data.two_5==True: att_count=att_count+1 if attendance_sheet_data.two_6==True: att_count=att_count+1 if attendance_sheet_data.two_7==True: att_count=att_count+1 if attendance_sheet_data.two_8==True: att_count=att_count+1 if attendance_sheet_data.two_9==True: att_count=att_count+1 if attendance_sheet_data.two_0==True: att_count=att_count+1 if attendance_sheet_data.three_1==True: att_count=att_count+1 percentage = (float(att_count/31.00))*100 res[attendance_sheet_data.id] = percentage return res Here percentage value is not calculating......
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up