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'
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
How to send email in openerp by python code
Diselesaikan
|
|
4
Okt 16
|
31235 | |
|
1
Sep 15
|
3912 | ||
|
1
Jun 15
|
832 | ||
|
0
Apr 15
|
674 | ||
|
2
Apr 15
|
850 |