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

How to get working days for leaves that has a name from few words?

By
Saulius
on 6/15/15, 9:04 AM 539 views

In salary rules I can get worked days by value:

worked_days.WORK100.number_of_days

How to get number of days for leaves "Sick Leaves", "Legal Leaves" and other leave types that has more than one word?

Because this would not work:

worked_days.Sick Leaves.number_of_days 
0
Saulius
On 7/2/15, 3:08 AM

yes Emad Jaddou, I know that it works when you have one word but leaves and payslips that has leaves included in its lines are as documents, so it would be better to have it with names that was given to leaves. The solution with quotes does not work. To have it as a variable:

leaveName = "Sick Leaves"
worked_days.leaveName.number_of_days

also does not work.

0
Emad Jaddou
On 6/30/15, 12:58 PM

best thing is to name them as one word, this should work as I tried that. It is possible also if you add quotes "" but I have not tried that.

worked_days.SickLeaves.number_of_days  

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: 6/15/15, 9:04 AM
Seen: 539 times
Last updated: 7/2/15, 3:10 AM