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

Hello there,

We are on Odoo 8.

I use a salary rule to calculate the sum of worked hours in the year. The python code of this salary rule is :

    result = payslip.sum('HEURES', '2015-12-27','2016-12-31') + HEURES


With this actual rule, we will have to create a new rule for each new year. More, if we cancel and revalidate a payslip, for example a payslip for february, it takes all the hours worked in the year instead of the total worked hours until de date_to of this payslip...

Would you know a way to have this rule totally dynamic (using date_to or date_from fields of a payslip, for example)?

Thanks to help!


الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
ديسمبر 23
1251
1
فبراير 23
2378
0
ديسمبر 22
1802
1
سبتمبر 19
6595
5
يوليو 19
10827