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

Dear all,

I had successfully installed a standalone odoo instance but the invoicing application failed to install. Please does anyone have the workaround to fix it?

Avatar
Discard

It will be nice if you can check the odoo log to understand why the installation is getting failed.
Once you check the odoo log, it will be easy to trace and fix it.
So please check the log and update the question with the error message received.

Author

2022-03-12 05:01:11,935 1 INFO mbsse odoo.modules.loading: loading account/views/account_view.xml
2022-03-12 05:01:12,283 1 INFO mbsse odoo.addons.base.models.ir_ui_view: Element '<xpath expr="//field[@name='partner_id']">' cannot be located in parent view

Error context:
View `res.partner.bank.form`
[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]
2022-03-12 05:01:12,375 1 WARNING mbsse odoo.modules.loading: Transient module states were reset
2022-03-12 05:01:12,377 1 ERROR mbsse odoo.modules.registry: Failed to load registry
Traceback (most recent call last):
File "/opt/odoo/odoo/models.py", line 1128, in _validate_fields
check(self)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 345, in _check_xml
view_def = view.read_combined(['arch'])
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 818, in read_combined
arch_tree = self.apply_inheritance_specs(arch_tree, view_arch, parent_view['id'])
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 747, in apply_inheritance_specs
self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 568, in raise_view_error
raise ValueError(message)
ValueError: Element '<xpath expr="//field[@name='partner_id']">' cannot be located in parent view

Error context:
View `res.partner.bank.form`
[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/opt/odoo/odoo/models.py", line 3910, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo/odoo/models.py", line 3824, in _load_records_create
return self.create(values)
File "<decorator-gen-33>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/models.py", line 3641, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo/odoo/fields.py", line 1200, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 445, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo/odoo/models.py", line 3366, in write
self._write(store_vals)
File "/opt/odoo/odoo/models.py", line 3502, in _write
self._validate_fields(vals)
File "/opt/odoo/odoo/models.py", line 1132, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Error while validating constraint\n\nElement \'<xpath expr="//field[@name=\'partner_id\']">\' cannot be located in parent view\n\nError context:\nView `res.partner.bank.form`\n[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/opt/odoo/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 755, in parse
self.parse(rec, mode)
File "/opt/odoo/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/opt/odoo/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/opt/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/opt/odoo/odoo/models.py", line 3910, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo/odoo/models.py", line 3824, in _load_records_create
return self.create(values)
File "<decorator-gen-33>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/models.py", line 3641, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo/odoo/fields.py", line 1200, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 445, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo/odoo/models.py", line 3366, in write
self._write(store_vals)
File "/opt/odoo/odoo/models.py", line 3502, in _write
self._validate_fields(vals)
File "/opt/odoo/odoo/models.py", line 1132, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating constraint

Element '<xpath expr="//field[@name='partner_id']">' cannot be located in parent view

Error context:
View `res.partner.bank.form`
[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]
None" while parsing /opt/odoo/addons/account/views/account_view.xml:320, near
<record id="view_company_partner_bank_form" model="ir.ui.view">
<field name="name">company.res.partner.bank.form</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="mode">primary</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
You can now launch your browser at http://[wdb.server]:1984/pm/session/e95d26f3-ada4-4df7-a7ac-616d9cfe6fc5
2022-03-12 05:01:25,290 1 DEBUG mbsse odoo.modules.registry: Multiprocess load registry signaling: [Registry: 4] [Cache: 36]

Author

Niyas,
Please see the error from the log above.

As per the below line in your log, the partner_id cannot be located in view base.view_partner_bank_form. This view should be created once you create a new DB beacuse it's created with base module.

Try to restart your Odoo service and then upgrade the base module , then try to install invoicing app.

Author

Waleed,
I am new to Odoo implementation; please can you help with the steps how to create the view or upgrade the base module.

Author

Waleed,'
Finally figured out how to do the upgrade but after I did and click install on the invoicing app it give out this error:

check(self)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 345, in _check_xml
view_def = view.read_combined(['arch'])
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 818, in read_combined
arch_tree = self.apply_inheritance_specs(arch_tree, view_arch, parent_view['id'])
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 747, in apply_inheritance_specs
self.raise_view_error(_("Element '%s' cannot be located in parent view") % tag, inherit_id)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 568, in raise_view_error
raise ValueError(message)
ValueError: Element '<xpath expr="//field[@name='partner_id']">' cannot be located in parent view

Error context:
View `res.partner.bank.form`
[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/opt/odoo/odoo/models.py", line 3910, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo/odoo/models.py", line 3824, in _load_records_create
return self.create(values)
File "<decorator-gen-33>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/models.py", line 3641, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo/odoo/fields.py", line 1200, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/opt/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 445, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo/odoo/models.py", line 3366, in write
self._write(store_vals)
File "/opt/odoo/odoo/models.py", line 3502, in _write
self._validate_fields(vals)
File "/opt/odoo/odoo/models.py", line 1132, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.exceptions.ValidationError: ('Error while validating constraint\n\nElement \'<xpath expr="//field[@name=\'partner_id\']">\' cannot be located in parent view\n\nError context:\nView `res.partner.bank.form`\n[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]', None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/odoo/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/odoo/odoo/modules/loading.py", line 421, in load_modules
loaded_modules, update_module, models_to_check)
File "/opt/odoo/odoo/modules/loading.py", line 313, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "/opt/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package, report=report)
File "/opt/odoo/odoo/modules/loading.py", line 68, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
File "/opt/odoo/odoo/tools/convert.py", line 802, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/opt/odoo/odoo/tools/convert.py", line 865, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 755, in parse
self.parse(rec, mode)
File "/opt/odoo/odoo/tools/convert.py", line 764, in parse
exc_info[2]
File "/opt/odoo/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/opt/odoo/odoo/tools/convert.py", line 758, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/opt/odoo/odoo/tools/convert.py", line 663, in _tag_record
record = model.with_context(rec_context)._load_records([data], self.mode == 'update')
File "/opt/odoo/odoo/models.py", line 3910, in _load_records
records = self._load_records_create([data['values'] for data in to_create])
File "/opt/odoo/odoo/models.py", line 3824, in _load_records_create
return self.create(values)
File "<decorator-gen-33>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 428, in create
return super(View, self).create(vals_list)
File "<decorator-gen-3>", line 2, in create
File "/opt/odoo/odoo/api.py", line 462, in _model_create_multi
return create(self, arg)
File "/opt/odoo/odoo/models.py", line 3641, in create
fields[0].determine_inverse(batch_recs)
File "/opt/odoo/odoo/fields.py", line 1200, in determine_inverse
getattr(records, self.inverse)()
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 275, in _inverse_arch
view.write(data)
File "/opt/odoo/addons/website/models/ir_ui_view.py", line 41, in write
return super(View, self).write(vals)
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 445, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo/odoo/models.py", line 3366, in write
self._write(store_vals)
File "/opt/odoo/odoo/models.py", line 3502, in _write
self._validate_fields(vals)
File "/opt/odoo/odoo/models.py", line 1132, in _validate_fields
raise ValidationError("%s\n\n%s" % (_("Error while validating constraint"), tools.ustr(e)))
odoo.tools.convert.ParseError: "Error while validating constraint

Element '<xpath expr="//field[@name='partner_id']">' cannot be located in parent view

Error context:
View `res.partner.bank.form`
[view_id: 123, xml_id: base.view_partner_bank_form, model: res.partner.bank, parent_id: n/a]
None" while parsing /opt/odoo/addons/account/views/account_view.xml:320, near
<record id="view_company_partner_bank_form" model="ir.ui.view">
<field name="name">company.res.partner.bank.form</field>
<field name="model">res.partner.bank</field>
<field name="inherit_id" ref="base.view_partner_bank_form"/>
<field name="mode">primary</field>
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='partner_id']" position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
</field>
</record>
You can now launch your browser at http://[wdb.server]:1984/pm/session/2de18e88-657b-43f5-8802-4bfb52d65554

Try to get create a new DB and install invoicing, if you got the same issue, you need to get the latest Odoo code from GitHub.

Author Best Answer

I reinstalled Odoo again and then install invoicing first before the other modules. Now the invoicing is working. Thanks to everyone who had participated in this post.

Avatar
Discard