I want to create a new salary rule that would sum all the lines on a payslip input based on each input line's contract.
I'm new to Python, started reading some code but can't figure out how to get the contract.wage for each input line and sum it.
I tried something like
for input_line in payslip.input_line_ids: result += input_line.contract.wage
Of course, this is wrong. Any ideas?
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
|Asked: 2/20/13, 6:19 PM|
|Seen: 2348 times|
|Last updated: 3/16/15, 8:10 AM|