Community mailing list archives

community@mail.odoo.com

Re: Payslips

by
Iman Ahmad
- 08/05/2015 01:38:26
Thanks all 

Levent Karakas  can you please tell me where to write each on of these codes 
is it in the salary rule result field ? 


On Tue, Aug 4, 2015 at 4:18 PM, Levent Karakas <levent@mektup.at> wrote:
1) Add a rule to calculate daily rate (DAILY_RATE) with python code like this:

result = employee.wage / 30


2) then you will need to add another rule and use this to count total number of days (WORKED_DAYS) worked like this:

result = 0 for line in payslip.worked_days_line_ids: result += line.number_of_days if result >= 28: result = 30


odoo automatically decrements leaves from work days (WORK100.days), but unfortunately weekends are not counted here. we added another automatically computed entry here for weekends with python code.


3) finally add another rule to calculate the wage:

result = DAILY_RATE * WORKED_DAYS






2015-08-04 15:42 GMT+03:00 Iman Ahmad <iman.ahmad@minervadata.com>:

I want to generate payslips which takes the total wage and divide it to 30 and then multiply it by the number of days the employee work (which are equal to 30- leaves )

how can i achieve this 

any help ?


--
Best Regards
Iman Ahmad
Minerva Data Pty .Ltd.
P.O.BOX 4356, Geelong, VIC 3220, Australia

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
Best Regards
Iman Ahmad
Minerva Data Pty .Ltd.
P.O.BOX 4356, Geelong, VIC 3220, Australia
Tel: +962 6 588 5786