Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to upgrade database v8.0

8.0
By
Lucas Huber
on 7/20/14, 12:01 PM 2,047 views

From my experience upgrading odoo 8.0 saas versions to 8.0rc1 or from different rc1 updates is still a tricky thing.

When I update an instance created with an early rc1 version I get allways the following error. Another result of this is a missmatch in the access rights. Can any body tell my what is about the file base/ir/ir_ui_view.py?
This question is related to a previous post: https://www.odoo.com/forum/help-1/question/how-to-upgrade-database-v8-0-from-saas-versions-56832

Update command used:
odoo@ubuntu-amd64:/var/log/odoo$ /opt/odoo/odoo-server/odoo.py -d koina-ag -u all  --config=/etc/odoo-server.conf

/var/log/odoo/odoo-server.log :......
2014-07-18 05:42:37,526 1583 INFO dbname openerp.modules.loading: loading product/partner_view.xml
2014-07-18 05:42:37,626 1583 INFO dbname openerp.modules.loading: loading product/views/report_pricelist.xml
2014-07-18 05:42:37,710 1583 ERROR dbname openerp.addons.base.ir.ir_ui_view: Element '<field name="attribute_line_ids"
>' cannot be located in parent view

Error context:
View `product.template.form`
[view_id: 258, xml_id: product.product_template_form_view_variant_button, model: product.template, parent_id: 251]
                
2014-07-18 05:42:37,712 1583 CRITICAL dbname openerp.service.server: Failed to initialize dbname `dbname`.
Traceback (most recent call last):
  File "/opt/odoo/odoo-server/openerp/service/server.py", line 901, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/opt/odoo/odoo-server/openerp/modules/registry.py", line 322, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 353, in load_modules
    force, status, report, loaded_modules, update_module)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 263, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_c
hecks=perform_checks)
  File "/opt/odoo/odoo-server/openerp/modules/loading.py", line 198, in load_module_graph
    registry['ir.ui.view']._validate_module_views(cr, SUPERUSER_ID, module_name)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 1128, in _validate_module_views
    if not self._check_xml(cr, uid, [vid]):
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 212, in _check_xml
    view_def = self.read_combined(cr, uid, view.id, None, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 551, in read_combined
    cr, uid, v.inherit_id.id, fields=fields, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 566, in read_combined
    cr, uid, arch_tree, root_id, base.model, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 518, in apply_view_inheritance
    source = self.apply_inheritance_specs(cr, uid, source, specs_tree, view_id, context=context)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 496, in apply_inheritance_specs
    self.raise_view_error(cr, uid, _("Element '%s' cannot be located in parent view") % tag, inherit_id, context=context
)
  File "/opt/odoo/odoo-server/openerp/api.py", line 204, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/odoo-server/openerp/addons/base/ir/ir_ui_view.py", line 381, in raise_view_error
    raise AttributeError(message)
AttributeError: Element '<field name="attribute_line_ids">' cannot be located in parent view

Error context:
View `product.template.form`
[view_id: 258, xml_id: product.product_template_form_view_variant_button, model: product.template, parent_id: 251]

0
Lucas Huber
On 7/23/14, 11:50 AM

Hi Stephen, where is your anwer?
There could be a relation to this issue: https://www.odoo.com/forum/help-1/question/8-0-acl-strange-behaviour-or-bug-58344

0
Jos De Graeve
On 7/29/14, 5:33 AM

Hi,

Just delete the view from the database with these SQL statements:

=> delete from ir_ui_view where id=***;
DELETE 1
=> delete from ir_model_data where res_id=*** and name like '%product_template_form_view_variant_button%';
DELETE 1

-> replace the *** with the number behind "view_id" in the error message

The error is probably because a view has been removed from a module, but is left in the database.

Regards,

Jos

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/20/14, 12:01 PM
Seen: 2047 times
Last updated: 3/16/15, 8:10 AM