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

Integrity Error while installing new modules

By
Sander Goossens
on 9/14/14, 5:00 PM 1,137 views

Hi

I installed OpenERP on my own server and I was installing new modules until I ran into the following 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: name - name]

I'm not able to install nor uninstall any modules anymore. The log contains the following message

Traceback (most recent call last):
  File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint
DETAIL:  Failing row contains (14, 1, 2014-09-14 20:44:02.10987, 2014-09-14 20:44:02.10987, 1, 1, null, null, null, 1, t, null, user).

2014-09-14 20:44:03,009 1091 ERROR endare openerp.tools.convert: Parse error in /opt/openerp/server/openerp/addons/hr_evaluation/hr_evaluation_data.xml:1185:
<record id="hr.employee" model="hr.employee">
            <field name="evaluation_plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
        </record>
Traceback (most recent call last):
  File "/opt/openerp/server/openerp/tools/convert.py", line 852, in parse
    self._tags[rec.tag](self.cr, rec, n)
  File "/opt/openerp/server/openerp/tools/convert.py", line 819, in _tag_record
    id = self.pool.get('ir.model.data')._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
  File "/opt/openerp/server/openerp/addons/base/ir/ir_model.py", line 971, in _update
    res_id = model_obj.create(cr, uid, values, context=context)
  File "/opt/openerp/server/openerp/addons/hr_holidays/hr_holidays.py", line 477, in create
    return super(hr_employee, self).create(cr, uid, vals, context=context)
  File "/opt/openerp/server/openerp/addons/hr/hr.py", line 222, in create
    employee_id = super(hr_employee, self).create(cr, uid, data, context=context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4444, in create
    record_id = self.pool.get(table).create(cr, user, tocreate[table], context=parent_context)
  File "/opt/openerp/server/openerp/osv/orm.py", line 4515, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/opt/openerp/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
IntegrityError: null value in column "name" violates not-null constraint
DETAIL:  Failing row contains (14, 1, 2014-09-14 20:44:02.10987, 2014-09-14 20:44:02.10987, 1, 1, null, null, null, 1, t, null, user).

Does anyone has an idea on how to fix this without reinstalling openERP or my databse? I read something online about a problem when you remove the admin account as employee. I have no idea whether that has anything to do with this or not?

1

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 9/15/14, 6:47 AM

2014-09-14 20:44:03,009 1091 ERROR endare openerp.tools.convert: Parse error in /opt/openerp/server/openerp/addons/hr_evaluation/hr_evaluation_data.xml:1185:
<record id="hr.employee" model="hr.employee">
            <field name="evaluation_plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
        </record>

The line above basically tells you that OpenERP was trying to import data from an XML file (which is very common) when trying to install a module, most likely hr_evaluation, but the data is somehow incorrect.

In this case, the "name" field is missing from the data. Try editing that file at the indicated row (1185) and adding a name field with some value to it. See if that works out.

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

1 follower(s)

Stats

Asked: 9/14/14, 5:00 PM
Seen: 1137 times
Last updated: 3/16/15, 8:10 AM