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

please i'm getting debug error when i click Human resource module

or press it one feature of the modules

Here is error detail

aise ValueError("Invalid field %r in leaf %r" % (left, str(leaf)))
ValueError: Invalid field 'company_id' in leaf "<osv.ExtendedLeaf: ('company_id', '=', False) on hr_holidays (ctx: )>"
Avatar
Discard
Best Answer
hello Abdirahman jawle

you have given invalid field name company_id or that field is not available in that model that's they giving this error

thank you
Avatar
Discard
Author Best Answer

Ankit gauri

when i try to view the companies also i'm getting this error

Odoo Server Error
Traceback (most recent call last):
  File "/home/testserver/odoo-8.0/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/testserver/odoo-8.0/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/home/testserver/odoo-8.0/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/home/testserver/odoo-8.0/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/home/testserver/odoo-8.0/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/home/testserver/odoo-8.0/addons/web/controllers/main.py", line 949, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/home/testserver/odoo-8.0/addons/web/controllers/main.py", line 941, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/models.py", line 1554, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(cr, uid, self._name, etree.fromstring(result['arch']), view_id, context=ctx)
  File "/home/testserver/odoo-8.0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/addons/base/ir/ir_ui_view.py", line 843, in postprocess_and_fields
    self.raise_view_error(cr, user, message, view_id, context)
  File "/home/testserver/odoo-8.0/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/testserver/odoo-8.0/openerp/addons/base/ir/ir_ui_view.py", line 367, in raise_view_error
    raise AttributeError(message)
AttributeError: Field `company_code` does not exist

Error context:
View `res.company.form`
[view_id: 111, xml_id: base.view_company_form, model: res.company, parent_id: n/a]
Avatar
Discard

company_code is not a field in Odoo 8.0 (no more in 6.0, 7.0 or 9.0...)