Odoo Help

1

Can I access contribution registers in payroll rules?

By
Nicholas Linn
on 2/12/13, 4:07 PM 2,539 views

Some deductions have a yearly limit per employee. Is there away to check these registers within a salary rule to determine if the maximum has been paid?

To elaborate:

In Canada we have two limited deductions, one of which is EI (employment Insurance) which deducts 1.88% of the total payslip up to a maximum of $891.12 within the year after which the deduction stops. In order to achieve this I am looking to add a Python Expression under condition that grabs the total contributions over the year period and if it is less then the $891.12 allow the payroll rule to proceed. My issue I am hitting is that I am unsure how to get the total of one register for the year to date within the condition rule.

3
Nicholas Linn
On 3/7/13, 10:51 AM

Okay found this out for myself under the example above, the following conditional statement will work assuming the rule name is EI:

result = payslip.sum('EI','2013-01-01',' 2013-12-31') > -891.12

Still would be nice not to have to change the formula every year. Any ideas?

Bit of a hack but you can use the contract start and end date to define the fiscal year:

result = payslip.sum('EI',contract.date_start,contract.date_end) > -891.12

1

You can do analysis on Payslip lines with by grouping on contribution register and employee.. Or you have to go to Payroll Register report.

Can you give me a bit more details on this within the context of the payroll rules?

Nicholas Linn
on 3/6/13, 5:02 PM

Yes, We can link Contribution register on Payroll/Salary rules which is going to be Payslip Lines once you prepare payslip for your employee... For eg. PF contribution: We will be having two different salary rules for PF deduction for employee one for Employee deduction and second for Employer deduction .. For employer deduction PF salary rules you can link or refer already create contribution register "PF Comapany Contribution" on it.. So all related payslip lines encoded in payslips will be visible on specific register..

Mustufa Rangwala (mra)
on 3/7/13, 1:15 AM
0
David Dufresne
On 3/25/15, 9:30 PM

This issue is solved with module hr_salary_rule_variable on https://github.com/OCA/hr/tree/7.0. Salary rules point on variables that change over the time. The whole salary structure for Canada is implemented and is currently in a PR to OCA: https://github.com/OCA/l10n-canada/pull/43. Reviews would be very appreciated.

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 2/12/13, 4:07 PM
Seen: 2539 times
Last updated: 1/9/17, 1:30 AM