xml - odoo 8 ParseError: "ValidateError Field(s) `arch` failed against a constraint: Invalid view definition -
i'm trying install module in odoo 8, , receive following error:
traceback (most recent call last): file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception return super(jsonrequest, self)._handle_exception(exception) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch result = self._call_function(**self.params) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, in _call_function return checked_call(self.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 307, in checked_call return self.endpoint(*a, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__ return self.method(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap response = f(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 952, in call_button action = self._call_kw(model, method, args, {}) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in _call_kw return checked_call(request.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 939, in checked_call return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 447, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 495, in _button_immediate_function registry = openerp.modules.registry.registrymanager.new(cr.dbname, update_module=true) file "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 355, in load_modules loaded_modules, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 901, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 987, in convert_xml_import obj.parse(doc.getroot(), mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 853, in parse self._tags[rec.tag](self.cr, rec, n, mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 763, in _tag_record id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or false, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1077, in _update res_id = model_obj.create(cr, uid, values, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 255, in create context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api result = method(recs, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4084, in create record = self.browse(self._create(old_vals)) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 472, in new_api result = method(self._model, cr, uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4275, in _create recs._validate_fields(vals) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1272, in _validate_fields raise validationerror('\n'.join(errors)) parseerror: "validateerror field(s) `arch` failed against constraint: invalid view definition error details: element '<xpath expr="/form/sheet/notebook/page[@string='general properties']">' cannot located in parent view error context: view `inherited fleet vehicle form` [view_id: 779, xml_id: n/a, model: fleet.vehicle, parent_id: 685]" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/transport_sale-master/transport_sale.xml:125, near <record model="ir.ui.view" id="inherited_fleet_vehicle_form_view"> <field name="name">inherited fleet vehicle form</field> <field name="model">fleet.vehicle</field> <field name="inherit_id" ref="fleet.fleet_vehicle_form"/> <field name="arch" type="xml"> <data><xpath expr="//label[@for='tag_ids']" position="before"> <label for="internal_number" class="oe_edit_only"/> <h2> <field name="internal_number" class="oe_inline"/> </h2> <label for="is_trailer" class="oe_edit_only"/> <field name="is_trailer" string="is trailer" help="mark if vehicle trailer"/> </xpath> <xpath expr="/form/sheet/notebook/page[@string='general properties']" position="after"> <page string="transport sales"> <field name="sales_order_ids" readonly="1"> <tree editable="bottom"> <field name="sale_order_id"/> <field name="sales_date"/> <field name="partner_departure_id"/> <field name="partner_destination_id"/> <field name="delivery_date"/> <field name="return_date"/> </tree> </field> </page> </xpath> </data></field> </record>
according error offending part of module seems be:
<!-- fleet vehicle sales form --> <record model="ir.ui.view" id="inherited_fleet_vehicle_form_view"> <field name="name">inherited fleet vehicle form</field> <field name="model">fleet.vehicle</field> <field name="inherit_id" ref="fleet.fleet_vehicle_form" /> <field name="arch" type="xml"> <xpath expr="//label[@for='tag_ids']" position="before"> <label for="internal_number" class="oe_edit_only"/> <h2> <field name="internal_number" class="oe_inline" /> </h2> <label for="is_trailer" class="oe_edit_only"/> <field name="is_trailer" string="is trailer" help="mark if vehicle trailer"/> </xpath> <xpath expr="/form/sheet/notebook/page[@string='general properties']" position="after"> <page string="transport sales"> <field name="sales_order_ids" readonly="1"> <tree editable="bottom"> <field name="sale_order_id" /> <field name="sales_date" /> <field name="partner_departure_id" /> <field name="partner_destination_id" /> <field name="delivery_date" /> <field name="return_date" /> </tree> </field> </page> </xpath> </field> </record>
found posts plenty of similar errors varying solutions seem differ none seem work me. should do?
edit
cleaned first code block , replaced full error in second after applying
<xpath expr="/form/sheet/group[@string='general properties']" position="after">
as suggested in comment below, error follows:
traceback (most recent call last): file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception return super(jsonrequest, self)._handle_exception(exception) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch result = self._call_function(**self.params) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, in _call_function return checked_call(self.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 307, in checked_call return self.endpoint(*a, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__ return self.method(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap response = f(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 952, in call_button action = self._call_kw(model, method, args, {}) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in _call_kw return checked_call(request.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 939, in checked_call return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 447, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 495, in _button_immediate_function registry = openerp.modules.registry.registrymanager.new(cr.dbname, update_module=true) file "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 355, in load_modules loaded_modules, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 901, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 987, in convert_xml_import obj.parse(doc.getroot(), mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 853, in parse self._tags[rec.tag](self.cr, rec, n, mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 763, in _tag_record id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or false, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1077, in _update res_id = model_obj.create(cr, uid, values, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 255, in create context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api result = method(recs, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4084, in create record = self.browse(self._create(old_vals)) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 472, in new_api result = method(self._model, cr, uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4275, in _create recs._validate_fields(vals) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1272, in _validate_fields raise validationerror('\n'.join(errors)) parseerror: "validateerror field(s) `arch` failed against constraint: invalid view definition" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/transport_sale-master/transport_sale.xml:125, near <record model="ir.ui.view" id="inherited_fleet_vehicle_form_view"> <field name="name">inherited fleet vehicle form</field> <field name="model">fleet.vehicle</field> <field name="inherit_id" ref="fleet.fleet_vehicle_form"/> <field name="arch" type="xml"> <data><xpath expr="//label[@for='tag_ids']" position="before"> <label for="internal_number" class="oe_edit_only"/> <h2> <field name="internal_number" class="oe_inline"/> </h2> <label for="is_trailer" class="oe_edit_only"/> <field name="is_trailer" string="is trailer" help="mark if vehicle trailer"/> </xpath> <xpath expr="/form/sheet/group[@string='general properties']" position="after"> <page string="transport sales"> <field name="sales_order_ids" readonly="1"> <tree editable="bottom"> <field name="sale_order_id"/> <field name="sales_date"/> <field name="partner_departure_id"/> <field name="partner_destination_id"/> <field name="delivery_date"/> <field name="return_date"/> </tree> </field> </page> </xpath> </data></field> </record>
edit
after replacing [@string] [@name] suggested error remains follows below.
traceback (most recent call last): file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 537, in _handle_exception return super(jsonrequest, self)._handle_exception(exception) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 574, in dispatch result = self._call_function(**self.params) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 310, in _call_function return checked_call(self.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 307, in checked_call return self.endpoint(*a, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 803, in __call__ return self.method(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/http.py", line 403, in response_wrap response = f(*args, **kw) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 952, in call_button action = self._call_kw(model, method, args, {}) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 940, in _call_kw return checked_call(request.db, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 113, in wrapper return f(dbname, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 939, in checked_call return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 447, in button_immediate_install return self._button_immediate_function(cr, uid, ids, self.button_install, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/module/module.py", line 495, in _button_immediate_function registry = openerp.modules.registry.registrymanager.new(cr.dbname, update_module=true) file "/usr/lib/python2.7/dist-packages/openerp/modules/registry.py", line 370, in new openerp.modules.load_modules(registry._db, force_demo, status, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 355, in load_modules loaded_modules, update_module) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 255, in load_marked_modules loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks) file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 176, in load_module_graph _load_data(cr, module_name, idref, mode, kind='data') file "/usr/lib/python2.7/dist-packages/openerp/modules/loading.py", line 118, in _load_data tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 901, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 987, in convert_xml_import obj.parse(doc.getroot(), mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 853, in parse self._tags[rec.tag](self.cr, rec, n, mode=mode) file "/usr/lib/python2.7/dist-packages/openerp/tools/convert.py", line 763, in _tag_record id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or false, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context ) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_model.py", line 1077, in _update res_id = model_obj.create(cr, uid, values, context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_ui_view.py", line 255, in create context=context) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 241, in wrapper return old_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 336, in old_api result = method(recs, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4084, in create record = self.browse(self._create(old_vals)) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 472, in new_api result = method(self._model, cr, uid, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 4275, in _create recs._validate_fields(vals) file "/usr/lib/python2.7/dist-packages/openerp/api.py", line 239, in wrapper return new_api(self, *args, **kwargs) file "/usr/lib/python2.7/dist-packages/openerp/models.py", line 1272, in _validate_fields raise validationerror('\n'.join(errors)) parseerror: "validateerror field(s) `arch` failed against constraint: invalid view definition error details: element '<xpath expr="/form/sheet/notebook/page[@name='general properties']">' cannot located in parent view error context: view `inherited fleet vehicle form` [view_id: 866, xml_id: n/a, model: fleet.vehicle, parent_id: 830]" while parsing /usr/lib/python2.7/dist-packages/openerp/addons/transport_sale-master/transport_sale.xml:125, near <record model="ir.ui.view" id="inherited_fleet_vehicle_form_view"> <field name="name">inherited fleet vehicle form</field> <field name="model">fleet.vehicle</field> <field name="inherit_id" ref="fleet.fleet_vehicle_form"/> <field name="arch" type="xml"> <data><xpath expr="//label[@for='tag_ids']" position="before"> <label for="internal_number" class="oe_edit_only"/> <h2> <field name="internal_number" class="oe_inline"/> </h2> <label for="is_trailer" class="oe_edit_only"/> <field name="is_trailer" string="is trailer" help="mark if vehicle trailer"/> </xpath> <xpath expr="/form/sheet/notebook/page[@name='general properties']" position="after"> <page string="transport sales"> <field name="sales_order_ids" readonly="1"> <tree editable="bottom"> <field name="sale_order_id"/> <field name="sales_date"/> <field name="partner_departure_id"/> <field name="partner_destination_id"/> <field name="delivery_date"/> <field name="return_date"/> </tree> </field> </page> </xpath> </data></field> </record>
running out of space here ;) edit posted below
error shows path defined not found in parent view(fleet_vehicle_form
).
you need correct xpath.
as using odoo- v8.0
,
<xpath expr="/form/sheet/notebook/page[@string='general properties']" position="after">
change xpath below one...
<xpath expr="/form/sheet/group[@string='general properties']" position="after">
there no notebook & page
tags in parent view(fleet_vehicle_form
). so, that's why gives error.
Comments
Post a Comment