تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
8609 أدوات العرض

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
مارس 15
4744
1
مارس 15
6074
0
ديسمبر 24
9654
3
سبتمبر 24
21901
5
ديسمبر 24
53227