跳至內容
選單
此問題已被標幟
2 回覆
8608 瀏覽次數

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?

頭像
捨棄
最佳答案

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

最佳答案

@Nagy Lajos,

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

頭像
捨棄

Is your payroll working properly? Can you generate payslip?

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

相關帖文 回覆 瀏覽次數 活動
1
3月 15
4740
1
3月 15
6073
0
12月 24
9652
3
9月 24
21898
5
12月 24
53214