OpenERP: Connect to Database Using PgAdmin
October 27, 2013
OpenERP: PgAdmin III Connection
November 28, 2013

To do this, you need to Python Code the Salary Rule to include the Expense on the Payslip, I’ve been able to find some examples, but not sure how to code this specific task.


Salary Python Code Examples
# 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 = contract.wage * 0.30
#result = inputs.COMIS1.amount
#result = 300
result = categories.ALW

Leave a Reply

Your email address will not be published. Required fields are marked *