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.

1

Get payslip input lines contract wage

By
Nagy Lajos
on 2/20/13, 6:19 PM 2,506 views

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?

0
Marc Wagener
On 1/21/14, 4:51 AM

@Nagy Lajos,

Have you solved this problem? I'm having a similar request. Marc

Is your payroll working properly? Can you generate payslip?

evon_dun
on 1/29/14, 1:37 AM

My payroll works fine I can generate payslip. I need probably the right Python code to do this. I'm still searching ....

Marc Wagener
on 1/29/14, 3:18 AM
0
nabeel
On 3/30/13, 7:42 AM

For the input python code is

result = (inputs.A and inputs.A.amount) + (inputs.B and inputs.B.amount)

where A and B are the codes of inputs.

@Nagy Lajos

Marc Wagener
on 1/21/14, 4:48 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: 2/20/13, 6:19 PM
Seen: 2506 times
Last updated: 3/16/15, 8:10 AM