Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Odoo

--Odoo --
1328
| 5 2 5
kerala, India
--Odoo --

Working as a Odoo Functional and Technical Expert

Odoo
On 11/23/15, 4:33 AM

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......

Amol Gangajaliwale
on 11/24/15, 12:38 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/23/15, 4:29 AM
Seen: 352 times
Last updated: 11/23/15, 4:33 AM