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

Any clear suggestion on how can i solve my dilemma

By
paolo
on 8/31/14, 2:36 AM 1,224 views

in my country we deduct our employees with their lates * hourly rate. so basically i need to compute for the total late of an employee for the month  and multiply it to the employee's hourly rate. 

I have added 3 more fields in hr.attendance, they are undertime, overtime and late

now i would like to use these fields in a salary rule.but the problem is that the only variables that can be used are:

#payslip: object containing the payslips
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days.
# inputs: object containing the computed inputs. 

attendances isn't included in the variables that i can use in order to make the salary rule i need.

 

if anyone has encountered the same problem and have figured out a solution to this, or if anyone knows a solution to this. please help me :) God Bless thanks

0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 8/31/14, 6:07 AM

Those variables are given just as an example !!!

You can access more existing variables.

 Try to access your variables by: attendance.late, attendance.overtime ...

 

You have to install first, some modules (like hr_payroll_extension) from:

For V8.0  https://github.com/OCA/hr/tree/8.0

For V7.0 https://github.com/OCA/hr/tree/7.0

uhm, just now i have tried again using the same approach. but I get an error. have you tried it? may i ask what version of you Odoo you have?

paolo
on 8/31/14, 6:58 AM

Thanks for replying :)

paolo
on 8/31/14, 6:58 AM

How did you created late, overtime, and undertime fields ?

Med Said BARA
on 8/31/14, 7:31 AM

Sorry, just an oversight. I've completed my answer.

Med Said BARA
on 8/31/14, 8:31 AM

ok sir, thanks a lot :)

paolo
on 8/31/14, 9:15 AM

i tried this on a V8, but it does not work sir. i also tried it on a later version, it did successfully installed but it cant use the variables from attendance or other modules. do you still have any other idea of how to solve this problem? thank you very much, your help is much appreciated. :)

paolo
on 9/1/14, 9:08 AM

i tried this on a V8, but it does not work sir. i also tried it on a later version, it did successfully installed but it cant use the variables from attendance or other modules. do you still have any other idea of how to solve this problem? thank you very much, your help is much appreciated. :)

paolo
on 9/1/14, 9:08 AM

I've posted a new links from Github

Med Said BARA
on 9/1/14, 10:26 AM

Sometimes it's very hard to remember all the tricks, patches, and changes we've done ... I will complete my answer later this night to show you how we can inherit from any Model.

Med Said BARA
on 9/1/14, 10:55 AM

okay sir, will wait for it thank you very much

paolo
on 9/1/14, 8:44 PM

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

2 follower(s)

Stats

Asked: 8/31/14, 2:36 AM
Seen: 1224 times
Last updated: 3/16/15, 8:10 AM