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?