Good morning!!
Please, i want to get the amount of many rules previously calculated but with some conditions on some fields. I have tried rules.*** but it doesnt give me what i have pretected Please who can help me.
Thanks in advance.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Good morning!!
Please, i want to get the amount of many rules previously calculated but with some conditions on some fields. I have tried rules.*** but it doesnt give me what i have pretected Please who can help me.
Thanks in advance.
Hi,
First: you have to take care of the sequence of the rule .
Then you can include the rule previously calculated by write its code
e.g if you have a rule with code COLA "lower sequence, higher priority"
you can use :
result = COLA + 100
if you'd like to make some conditions on COLA for example you can use:
result = ((COLA - 75 < 0) and 0 or (COLA -75)) + 100
and so on ...
you can access all fields/objects that listed in the comment
# 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'
Create an account today to enjoy exclusive features and engage with our awesome community!
Tilmeld digRelated Posts | Besvarelser | Visninger | Aktivitet | |
---|---|---|---|---|
|
4
okt. 16
|
31234 | ||
|
1
sep. 15
|
3910 | ||
|
1
jun. 15
|
832 | ||
|
0
apr. 15
|
674 | ||
|
2
apr. 15
|
850 |