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.

1

Incentives don't calculated in the payslip, why?

By
Rami Talat
on 12/26/14, 4:50 AM 2,210 views

When I defined some incentives in the "Pay Slip" form inside the "Other Input" section, and generated the pasyslip, it didn't calculated!!
Should I do anything missed?

in details pls... Where can I write this code? and Why -if i defined the bonus directly in "Other Input"- it doesn't work?

Rami Talat
on 12/26/14, 6:35 AM

I tried putting this code in a salary rule, but not worked!!

Rami Talat
on 12/26/14, 11:36 AM

Follow at: https://github.com/odoo/odoo/issues/4438

Med Said BARA
on 12/27/14, 5:30 PM

Thx Med, Can you test it on Odoo v8, rather than OpenERP v7?

Rami Talat
on 1/1/15, 6:18 PM

Zbik, Please tell me how can I use your code? and where?

Rami Talat
on 1/1/15, 6:20 PM
2

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 12/27/14, 7:04 AM

I've also tested this issue on my own OpenERP (V7.0) instance and  on runbot, and i think it's a bug.

The payslip is computed, but the new input is not taken into account.

--------------

Edit the file hr_payroll.py (under ../addons/hr_payroll/) around line 486 and add : 'amount': input.amount,

Are there any news about this subject?

Rami Talat
on 1/20/15, 2:34 PM

I've opened this issue 25 days ago on GITHUB, but still no response: https://github.com/odoo/odoo/issues/4438

Med Said BARA
on 1/21/15, 6:58 AM
0
Rami Talat
On 12/27/14, 6:27 AM

I tried putting this code in a salary rule, but not calculated correctly!!

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 12/26/14, 6:19 AM

You need to define appropriate "Salary Rules" based on "inputs" variable and python code, for example (fo "Other input" - code BONUS):

result = contract.wage * inputs.BONUS.amount / 100

In V8 this rule works for me:

        <record id="l10n_pl_hr_payroll.hr_salary_rule_premia" model="hr.salary.rule">
            <field name="code">PREMIA</field>
            <field eval="5" name="sequence"/>
            <field eval="1" name="appears_on_payslip"/>
            <field name="condition_range">contract.wage</field>
            <field name="company_id" ref="base.main_company"/>
            <field eval="25.0" name="amount_percentage"/>
            <field name="condition_select">none</field>
            <field name="amount_percentage_base">PREMIA</field>
            <field name="amount_select">code</field>
            <field eval="1" name="active"/>
            <field name="name">Premia wg bierzącej stawki procentowej pracownika</field>
            <field name="amount_python_compute">result = contract.wage * inputs.PREMIA_PRACOWNIKA.amount / 100</field>
            <field name="category_id" ref="hr_payroll.ALW"/>
            <field name="quantity">1.0</field>
        </record>

 

 

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

2 follower(s)

Stats

Asked: 12/26/14, 4:50 AM
Seen: 2210 times
Last updated: 3/16/15, 8:10 AM