Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

2

Best way to include YTD totals on Payslip?

By
Nicholas Linn
on 3/11/13, 11:25 AM 3,158 views

We are looking for in addition to the payslip totals for the given pay period, Year to date totals for the given deductions. What would be the best way of going about this on the reports? Could it be done by just modifing the report or would it require changes to the python module code as well?

Hello Nicholas, if you are interested by the canadian payroll, you may want to join and contribute to the OpenERP Canada project. There are people already working on it : https://launchpad.net/openerp-canada

Maxime Chambreuil
on 3/21/13, 4:54 PM

Sure, I am just cleaning up my some code and should have something shortly. I have requested to join.

Nicholas Linn
on 3/21/13, 5:16 PM

You have been accepted. johnb has started a module for the ontario payroll (l10n_ca_on_hr_payroll). Please contact him.

Maxime Chambreuil
on 3/22/13, 5:43 PM
2
Mario Arias Badila
On 3/13/13, 2:52 AM

Hi Nicholas,

Originally posted by Mustufa Rangwala on OpenERP community list

To calculate YTD Income you can use sum method on available objects in your expression.

sum() method available for three objects/variables i.e.payslip, worked_days, inputs.

They are : payslip.sum(code, from_date, to_date) worked_days.sum(code, from_date, to_date), inputs.sum(code, from_date, to_date)

Where Code is Salary rule code and Dates are begin and Ending Date (Start Period and Current Period dates.)

For example: If you want to sum all gross amount between Jan to Dec 2012. You can just create one salary rule with expression payslip.sum('GROSS', 01/01/2012, 31/12/2012).

I know and use that within salary rules for calculating maximum contributions. However when I try to add that code directly into the report (in openoffice) it doesn't work. I assume that I have to modify the python code of the report?

Nicholas Linn
on 3/13/13, 9:29 AM

If you are just need to see the print of that payslip rule/payslip lines on the report it will come automatically with Report, But if you want to use that code you need to change the python code. Can you tell me what report you want to modify ?

Mustufa Rangwala (mra)
on 3/22/13, 2:08 AM

The goal is the modify "Employee Payslip" to show YTD totals of each line in a new column next to the payslip line total.

Nicholas Linn
on 3/22/13, 4:23 PM

Ok, You need to modify the your report for that..

Mustufa Rangwala (mra)
on 3/25/13, 1:58 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 3/11/13, 11:25 AM
Seen: 3158 times
Last updated: 12/30/15, 3:39 PM