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

I am facing wrong python code defined for total deduction while doing the salary rules, can someone help me?

아바타
취소

It's necessary for you to give more details of what you want to do and what you've tried. Can you give examples?

작성자
Example: the total deduction is calculated as Gross taxable income + Pension contribution(7%)

and this is the codinge that I tried

# Available variables:
#----------------------
# payslip:object containing the payslips
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days.
# inputs: object containing the computed inputs.
# Note: returned value have to be set in the variable

'result' result = categories.GTI + categories.PC

and its not working

On Fri, May 28, 2021 at 9:07 AM Josep Anton Belchi Riera <josepanton.belchi@midgard.cat> wrote:

It's necessary for you to give more details of what you want to do and what you've tried. Can you give examples?

Enviado por Odoo S.A. usando Odoo.

베스트 답변

Dear Hanna Hailu,

First you need to create Gross taxable income and Pension contribution(7%) salary rule and the the sequence number will be for example 1 and 2

After that you need to create a salary rule for the total deduction and the sequence will be 3 other wise this will not work. So the sequence numbering is important.

아바타
취소