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

I'm quite new to Odoo, and (unwisely) attempted to add the website_description field as an option on my product creation form, and not only did I do so incorrectly, I seem to have impaired my ability to view the product listings in the odoo administration area or remove the field I added into the product creation form. I have built a number of sites before using open-source CMS's, although I'm by no means a developer, and so I thought I was familiar enough to hack in a few changes to the product form, but I can tell now that I'm in quite a bit over my head.

The area I tried to edit was (I believe) in the product.template.common.form, where I added in the following line:

<field name="website_description" widget="html"/>

...after the field <field name="currency_id" invisible="1"/>. After doing that, I could no longer edit the product page. I suspect I may have also changed a setting on the form linked through before you get to the product.template.common form, but I can't be sure because I don't know what the id of that form was. Now, when going to the Products area I receive the following traceback error:

 Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 640, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 677, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 333, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 326, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 935, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 885, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/addons/web/controllers/main.py", line 877, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 679, in call_kw
    return call_kw_model(method, model, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/api.py", line 664, in call_kw_model
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo/models.py", line 1338, in load_views
    for [v_id, v_type] in views
  File "/usr/lib/python2.7/site-packages/odoo/models.py", line 1338, in <dictcomp>
    for [v_id, v_type] in views
  File "/usr/lib/python2.7/site-packages/odoo/addons/mail/models/mail_thread.py", line 362, in fields_view_get
    res = super(MailThread, self).fields_view_get(view_id=view_id, view_type=view_type, toolbar=toolbar, submenu=submenu)
  File "/usr/lib/python2.7/site-packages/odoo/models.py", line 1397, in fields_view_get
    root_view = View.browse(view_id).read_combined(['id', 'name', 'field_parent', 'type', 'model', 'arch'])
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_ui_view.py", line 650, in read_combined
    parent_view = root.inherit_id.read_combined(fields=fields)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_ui_view.py", line 662, in read_combined
    arch = self.apply_view_inheritance(arch_tree, root.id, self.model)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_ui_view.py", line 611, in apply_view_inheritance
    source = self.apply_inheritance_specs(source, specs_tree, view_id)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_ui_view.py", line 589, in apply_inheritance_specs
    self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
  File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_ui_view.py", line 462, in raise_view_error
    raise ValueError(message)
ValueError: Element '<page name="invoicing">' cannot be located in parent view

Error context:
View `product.template.invoice.policy`
[view_id: 892, xml_id: sale.product_template_form_view_invoice_policy, model: product.template, parent_id: 435]

I get a similar error (the last bit, referencing the invoice policy), if I attempt to remove the website_description field from the view id 435. I'm not sure really where to proceed from here. Is it possible somehow to reset all views and forms related to products back to their default, or what can I do with this error to start to unravel the mess I have made?  Any good suggestions for guides on how to read through and decipher error messages in odoo would be greatly appreciated.




Avatar
Discard
Best Answer

Did you try to update the sales module? Or, even better, the base module.

Avatar
Discard