Skip to Content
Menu
This question has been flagged
2 Replies
3848 Views

Hello

I am getting this error when I am install CRM module (I have not made any changes to it):



ParseError: "null value in column "name" violates not-null constraint

" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/crm/crm_data.xml:46, near

<record model="crm.case.section" id="sales_team.section_sales_department">

<field name="use_leads">True</field>

<field name="alias_name">sales</field>

</record>


Anyone know how to fix this as I need to work with CRM


FULL ERROR:

Traceback (most recent call last):

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 530, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 567, in dispatch

result = self._call_function(**self.params)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 303, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper

return f(dbname, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 300, in checked_call

return self.endpoint(*a, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 796, in __call__

return self.method(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 396, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in call_button

action = self._call_kw(model, method, args, {})

File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 928, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 450, in button_immediate_install

return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 498, in _button_immediate_function

registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)

File "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 368, in new

openerp.modules.load_modules(registry._db, force_demo, status, update_module)

File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 355, in load_modules

loaded_modules, update_module)

File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules

loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)

File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph

_load_data(cr, module_name, idref, mode, kind='data')

File "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data

tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)

File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 901, in convert_file

convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 987, in convert_xml_import

obj.parse(doc.getroot(), mode=mode)

File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 853, in parse

self._tags[rec.tag](self.cr, rec, n, mode=mode)

File "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 763, in _tag_record

id = self.pool['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 "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1077, in _update

res_id = model_obj.create(cr, uid, values, context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/crm/sales_team.py", line 74, in create

section_id = super(crm_case_section, self).create(cr, uid, vals, context=create_context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/addons/mail/mail_thread.py", line 384, in create

thread_id = super(mail_thread, self).create(cr, uid, values, context=context)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper

return old_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api

result = method(recs, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4062, in create

record = self.browse(self._create(old_vals))

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper

return new_api(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 462, in new_api

result = method(self._model, cr, uid, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4200, in _create

tuple([u[2] for u in updates if len(u) > 2])

File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 158, in wrapper

return f(self, *args, **kwargs)

File "/usr/lib/python2.7/dist-packages/openerp/sql_db.py", line 234, in execute

res = self._obj.execute(query, params)

ParseError: "null value in column "name" violates not-null constraint

" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/crm/crm_data.xml:46, near

<record model="crm.case.section" id="sales_team.section_sales_department">

<field name="use_leads">True</field>

<field name="alias_name">sales</field>

</record>

Avatar
Discard
Author

occurs when I try to install anything now

Author Best Answer

Related to missing class error. Once classes were re added there was no further problems

Avatar
Discard

Please explain further. What Classes and how did you add them to resolve

Author

Hello Harold

Classes I had created myself that I didn't need. When I deleted them, and tried install CRM I got the above error. Luckly I had the classes saved and when I readded them, all worked. Not sure if this is the correct answer but it worked for me in this case.

I am no longer using Odoo so I cannot test to see if it is still a correct answer

Related Posts Replies Views Activity
3
Dec 19
3665
2
Jul 22
488
1
Mar 22
856
3
Oct 19
3393
0
May 17
4498