콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
8856 화면

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
4951
1
3월 15
6272
1
8월 25
4962
0
12월 24
9965
3
9월 24
22316