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.

0

Cant Confirm Employee Payslip

By
Amol Gangajaliwale
on 7/9/14, 11:14 AM 2,007 views

Hi Folks,

I am not able to register employee payslip I am getting an error

Integrity Error
 The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
 [object with reference: contract_id - contract.id]

The log I am getting on Terminal is 

ZVEMPL openerp.sql_db: bad query: insert into "hr_payslip_line" (id,"slip_id","condition_select","code","amount_select","rate","sequence","condition_python","amount","amount_python_compute","company_id","quantity","amount_percentage","appears_on_payslip","condition_range","active","category_id","amount_fix","name",create_uid,create_date,write_uid,write_date) values (17,16,'none','BASIC','fix','100.00',5,'
# Available variables:
#----------------------
# payslip: object containing the payslips
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days
# inputs: object containing the computed inputs

# Note: returned value have to be set in the variable ''result''

result = rules.NET > categories.NET * 0.10','27000.00','
# Available variables:
#----------------------
# payslip: object containing the payslips
# employee: hr.employee object
# contract: hr.contract object
# rules: object containing the rules code (previously computed)
# categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category).
# worked_days: object containing the computed worked days.
# inputs: object containing the computed inputs.

# Note: returned value have to be set in the variable ''result''

result = contract.wage * 0.10',1,'1.00','0.0000','True','contract.wage','True',1,'0.00','Basic',1,(now() at time zone 'UTC'),1,(now() at time zone 'UTC'))
Traceback (most recent call last):
  File "/home/server/workspace/openerp/openerp-7.0server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "contract_id" violates not-null constraint

 

Hi Med Said BARA, I know what to write in Worked Days but I dont know how to use Days and Inputs I tried it as Incentives  -    BONUS -  95000.00  -  Contract for Priya And then I computed salary But still there is an same error I would be very greatful to you if please tell me what exaclty the error means what are the steps I should follow

Amol Gangajaliwale
on 7/10/14, 6:17 AM

Hi Med Thanks for your reply , Actually I got now, earlier I was calculating Salary computation before confirming it . Thanks you resolved the issue

Amol Gangajaliwale
on 7/10/14, 6:57 AM
0

Med Said BARA

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

First:

Begin by creating a contract for your employee

Second:

If it's already done, select this contract ( i mean a valid contract for this employee) in the Employee Payslip (under the Tab : Worked Days & Inputs).

 

 

0
Amol Gangajaliwale
On 7/10/14, 6:57 AM

Hi Med Thanks for your reply ,

Actually I got now, earlier I was calculating Salary computation before confirming it .

Thanks you resolved the issue

 

 

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: 7/9/14, 11:14 AM
Seen: 2007 times
Last updated: 3/16/15, 8:10 AM