Odoo Help


Get payslip input lines contract wage

Nagy Lajos
on 2/20/13, 6:19 PM 3,577 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?

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
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?

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

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/20/13, 6:19 PM
Seen: 3577 times
Last updated: 3/16/15, 8:10 AM