Skip to Content
Menu
This question has been flagged
3 Replies
3630 Views

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/mvuke/mvuke-server/odoo/api.py", line 753, in get

    value = self._data[field][record._ids[0]]

KeyError: 279


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/mvuke/mvuke-server/odoo/fields.py", line 978, in __get__

    value = env.cache.get(record, self)

  File "/mvuke/mvuke-server/odoo/api.py", line 759, in get

    raise CacheMiss(record, field)

odoo.exceptions.CacheMiss: ('ir.actions.act_window(279,).search_view', None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_ui_view.py", line 642, in apply_inheritance_specs

    pre_locate=pre_locate)

  File "/mvuke/mvuke-server/odoo/tools/template_inheritance.py", line 222, in apply_inheritance_specs

    _("Element '%s' cannot be located in parent view") % tag

ValueError: Element '<search string="Search Invoice">' cannot be located in parent view


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/mvuke/mvuke-server/odoo/http.py", line 619, in _handle_exception

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

  File "/mvuke/mvuke-server/odoo/http.py", line 309, in _handle_exception

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

  File "/mvuke/mvuke-server/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/mvuke/mvuke-server/odoo/http.py", line 664, in dispatch

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

  File "/mvuke/mvuke-server/odoo/http.py", line 345, in _call_function

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

  File "/mvuke/mvuke-server/odoo/service/model.py", line 93, in wrapper

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

  File "/mvuke/mvuke-server/odoo/http.py", line 338, in checked_call

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

  File "/mvuke/mvuke-server/odoo/http.py", line 909, in __call__

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

  File "/mvuke/mvuke-server/odoo/http.py", line 510, in response_wrap

    response = f(*args, **kw)

  File "/mvuke/mvuke-server/addons/web/controllers/main.py", line 1639, in load

    action = request.env[action_type].browse([action_id]).read()

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_actions.py", line 204, in read

    result = super(IrActionsActWindow, self).read(fields, load=load)

  File "/mvuke/mvuke-server/odoo/models.py", line 2901, in read

    vals[name] = convert(record[name], record, use_name_get)

  File "/mvuke/mvuke-server/odoo/models.py", line 5581, in __getitem__

    return self._fields[key].__get__(self, type(self))

  File "/mvuke/mvuke-server/odoo/fields.py", line 1002, in __get__

    self.compute_value(recs)

  File "/mvuke/mvuke-server/odoo/fields.py", line 1087, in compute_value

    records._compute_field_value(self)

  File "/mvuke/mvuke-server/odoo/models.py", line 3897, in _compute_field_value

    getattr(self, field.compute)()

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_actions.py", line 171, in _compute_search_view

    fvg = self.env[act.res_model].fields_view_get(act.search_view_id.id, 'search')

  File "/mvuke/mvuke-server/addons/mail/models/mail_thread.py", line 410, in fields_view_get

    res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)

  File "/mvuke/mvuke-server/addons/web/models/models.py", line 203, in fields_view_get

    r = super().fields_view_get(view_id, view_type, toolbar, submenu)

  File "/mvuke/mvuke-server/odoo/models.py", line 1504, in fields_view_get

    result = self._fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)

  File "/mvuke/mvuke-server/odoo/models.py", line 1466, in _fields_view_get

    root_view = View.browse(view_id).read_combined(['id', 'name', 'field_parent', 'type', 'model', 'arch'])

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_ui_view.py", line 716, in read_combined

    arch = self.apply_view_inheritance(arch_tree, root.id, self.model)

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_ui_view.py", line 665, in apply_view_inheritance

    source = self.apply_inheritance_specs(source, specs_tree, view_id)

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_ui_view.py", line 644, in apply_inheritance_specs

    self.raise_view_error(str(e), inherit_id)

  File "/mvuke/mvuke-server/odoo/addons/base/models/ir_ui_view.py", line 592, in raise_view_error

    raise ValueError(message)

ValueError: Element '<search string="Search Invoice">' cannot be located in parent view


Error context:

View `account.invoice.select`

[view_id: 738, xml_id: account.view_account_invoice_filter, model: account.move, parent_id: 759]

Avatar
Discard

Inheritance in model and views: https://goo.gl/4Zyc9d

Best Answer

Hi Elvis


Yes is due to the inheriting thr view. It seems the view which you inherited is already inherited by some other extension. 

And inside your inherited view that part is replaced or changedDue to this other inherited views are not able to locate that view. 

So always make a practice to inherit the view from it's last inherited view.

Else decrease the priority of your view. Meanwhile kindly share the view which you inherited then it will be helpful to check this issue. 

You can also try by decreasing priority of that view. 
Thanks, 
Ashish Singh (Team Lead) 
Webkul Software Private Limited

Avatar
Discard
Best Answer

Hi Elvis,

The Search Invoice field is not present in the form view thats why its giving error. Kindly uncomment the parent "Search Invoice" and then check or you can make parent which field is present in that form view for e.g.:

<field name="field_present_in_form_view" position="below or above">

    <field name="your_required_field"/>

</field>

Thanks!

Avatar
Discard