Odoo Help


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.


what is the wrong in this rule

on 11/2/14, 9:20 AM 512 views

Hi all

i am trying to make overtime rule and get wrong python code

the rule
 result = (((contract.wage/30)/8)*0.25)*(inputs.OVERTIME_DAY_DAYS and inputs.OVERTIME_DAY_DAYS.amount)


On 11/2/14, 1:09 PM

I guess the problem is with this part: (inputs.OVERTIME_DAY_DAYS and inputs.OVERTIME_DAY_DAYS.amount).

Try to write it as: (bool(inputs.OVERTIME_DAY_DAYS.amount) and inputs.OVERTIME_DAY_DAYS.amount).

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)


Asked: 11/2/14, 9:20 AM
Seen: 512 times
Last updated: 3/16/15, 8:10 AM