Skip to Content
Menu
This question has been flagged
1488 Views

Hi team,

I am trying to install Attendances app and it is throwing some error like


Error:

Odoo Server Error

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 741, in parse

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

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 651, in _tag_record

id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_model.py", line 1469, in _update

record = record.create(values)

File "/usr/lib/python3/dist-packages/odoo/addons/hr/models/hr.py", line 219, in create

return super(Employee, self).create(vals)

File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 231, in create

thread = super(MailThread, self).create(values)

File "/usr/lib/python3/dist-packages/odoo/addons/resource/models/resource_mixin.py", line 29, in create

'name': values.get(self._rec_name)

File "/usr/lib/python3/dist-packages/odoo/addons/resource/models/resource.py", line 697, in create

return super(ResourceResource, self).create(values)

File "/usr/lib/python3/dist-packages/odoo/models.py", line 3278, in create

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

File "/usr/lib/python3/dist-packages/odoo/models.py", line 3371, in _create

cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))

File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper

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

File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute

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

psycopg2.IntegrityError: null value in column "name" violates not-null constraint

DETAIL: Failing row contains (35, null, t, 1, user, null, 100, 1, 1, 2018-02-14 13:41:33.095845, 1, 2018-02-14 13:41:33.095845).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/lib/python3/dist-packages/odoo/http.py", line 647, in _handle_exception

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

File "/usr/lib/python3/dist-packages/odoo/http.py", line 307, in _handle_exception

raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise

raise value

File "/usr/lib/python3/dist-packages/odoo/http.py", line 689, in dispatch

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

File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in _call_function

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

File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper

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

File "/usr/lib/python3/dist-packages/odoo/http.py", line 332, in checked_call

result = self.endpoint(*a, **kw)

File "/usr/lib/python3/dist-packages/odoo/http.py", line 933, in __call__

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

File "/usr/lib/python3/dist-packages/odoo/http.py", line 512, in response_wrap

response = f(*args, **kw)

File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 934, in call_button

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

File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 922, in _call_kw

return call_kw(request.env[model], method, args, kwargs)

File "/usr/lib/python3/dist-packages/odoo/api.py", line 689, in call_kw

return call_kw_multi(method, model, args, kwargs)

File "/usr/lib/python3/dist-packages/odoo/api.py", line 680, in call_kw_multi

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

File "<decorator-gen-40>", line 2, in button_immediate_install

File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 71, in check_and_log

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

File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 448, in button_immediate_install

return self._button_immediate_function(type(self).button_install)

File "/usr/lib/python3/dist-packages/odoo/addons/base/module/module.py", line 541, in _button_immediate_function

modules.registry.Registry.new(self._cr.dbname, update_module=True)

File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 85, in new

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

File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 343, in load_modules

loaded_modules, update_module)

File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 242, 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/python3/dist-packages/odoo/modules/loading.py", line 159, in load_module_graph

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

File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 94, in _load_data

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

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 788, in convert_file

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

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 849, in convert_xml_import

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

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 738, in parse

self.parse(rec, mode)

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 748, in parse

exc_info[2]

File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 86, in reraise

raise value.with_traceback(tb)

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 741, in parse

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

File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 651, in _tag_record

id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)

File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_model.py", line 1469, in _update

record = record.create(values)

File "/usr/lib/python3/dist-packages/odoo/addons/hr/models/hr.py", line 219, in create

return super(Employee, self).create(vals)

File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_thread.py", line 231, in create

thread = super(MailThread, self).create(values)

File "/usr/lib/python3/dist-packages/odoo/addons/resource/models/resource_mixin.py", line 29, in create

'name': values.get(self._rec_name)

File "/usr/lib/python3/dist-packages/odoo/addons/resource/models/resource.py", line 697, in create

return super(ResourceResource, self).create(values)

File "/usr/lib/python3/dist-packages/odoo/models.py", line 3278, in create

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

File "/usr/lib/python3/dist-packages/odoo/models.py", line 3371, in _create

cr.execute(query, tuple(u[2] for u in updates if len(u) > 2))

File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 155, in wrapper

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

File "/usr/lib/python3/dist-packages/odoo/sql_db.py", line 232, in execute

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

odoo.tools.convert.ParseError: "null value in column "name" violates not-null constraint

DETAIL: Failing row contains (35, null, t, 1, user, null, 100, 1, 1, 2018-02-14 13:41:33.095845, 1, 2018-02-14 13:41:33.095845).

" while parsing /usr/lib/python3/dist-packages/odoo/addons/hr_attendance/data/hr_attendance_demo.xml:4, near

<record id="hr.employee_al" model="hr.employee">

<field name="pin">0000</field>

<field name="barcode">123</field>

</record>

Please guide me how to overcome this error and install the application.

Regards

Mohan



Avatar
Discard

Hi,

If you haven't done any customization ,just try in a new db , in new db this issue will not be there I think

Author

Hi Niyas

Thank you for your quick response. I have not done any configuration. where can i create a new db

log out the db, there you can see a option Database manager, click it

Or from url : /web/database/manager

Author

Thank you Niyas. It worked :-)