Odoo Help


Integrity Error: [object with reference: alias_name - alias.name] on create object

remi mores
on 7/12/13, 9:50 AM 4,104 views

hi, i try to create a project object in my custom action handler:

def action_project_create(self,cr,uid,ids,context=None):
    project_project = self.pool.get('project.project')
    vals = {}
    project = project_project.create(cr,uid,vals,context=context)
    if(project == None):
        raise Exception('Create project failed!!!')

but I get the 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: alias_name - alias.name]

Could someone explain to me what to do?


Grover Menacho

--Grover Menacho--
WebVision Enterprise Systems
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho
On 7/12/13, 11:05 AM

If you see on the project.project object there are required fields. You can't create a new record without these fields so check alias_id and add an alias_id on your function.

THANX!!!! :) My mistake was i did not set the required fields as specified in project.py

remi mores
on 7/12/13, 12:09 PM

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.


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

0 follower(s)


Asked: 7/12/13, 9:50 AM
Seen: 4104 times
Last updated: 3/16/15, 8:10 AM