Skip to Content
Menu
This question has been flagged
1 Reply
2835 Views

I suspect incosistent Data in the DB. But where? How to fix that?.

Thanks for ANY Tipps!

While filling out my worktime i changed something in the "Config -> Employees" Section. I think that caused the Problem. How to fix that?

I have two Odoo Databseses. It works with DB 1, but not with DB Number 2

Tipp for the Programmers: If you encounter a DB Restriction, please mention the fucking affected Table in the error message.

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, 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 307, in checked_call
return self.endpoint(*a, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__
return self.method(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, 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 451, 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 499, 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 370, 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/product/product.py", line 1175, in create
return super(product_product, self).create(cr, uid, vals, context=ctx)
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 381, 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 4074, 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 4130, in _create
record_id = self.pool[table].create(cr, user, tocreate[table], 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/product/product.py", line 730, in create
product_template_id = super(product_template, self).create(cr, uid, vals, 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/mail/mail_thread.py", line 381, 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 4074, 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 4212, 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
DETAIL: Failing row contains (487, null, null, 1.00, null, 0, null, 1, fixed, 1, null, 2015-09-25 13:51:30.788517, 1.000, 1, t, 1, null, null, 1, null, 1, null, null, null, null, 2015-09-25 13:51:30.788517, t, f, null, null, consu, null, f, null, f, null, null, f, 7, f, f, t, null, f, 30, null, null, null, f, null, 1, 1).
" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/hr_timesheet/hr_timesheet_data.xml:15, near
<record id="product.product_product_consultant" model="product.product">
<field name="sale_ok">True</field>
</record>
Avatar
Discard
Author Best Answer

Learnings:

Always make a db backup before you click on something in odoo...


Solved:
I restored a (databse) backup - and after that timeshhets is installable. So the Bug was due to an incosistency in the database - caused by clicking around in odoo.

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 15
2572
2
May 15
3408
1
Mar 15
2455
9
Dec 23
16336
1
Mar 21
7407