Error: Odoo Server Error Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 664, in apply_inheritance_specs pre_locate=pre_locate) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\template_inheritance.py", line 230, in apply_inheritance_specs _("Element '%s' cannot be located in parent view") % tag ValueError: Element '<field name="date">' cannot be located in parent view During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 712, in parse self._tag_root(de) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 674, in _tag_root f(rec) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 577, in _tag_record record = model._load_records([data], self.mode == 'update') File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 4083, in _load_records records = self._load_records_create([data['values'] for data in to_create]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3997, in _load_records_create return self.create(values) File "<decorator-gen-32>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 475, in create return super(View, self).create(vals_list) File "<decorator-gen-3>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3778, in create fields[0].determine_inverse(batch_recs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\fields.py", line 1120, in determine_inverse getattr(records, self.inverse)() File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 299, in _inverse_arch view.write(data) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website_theme_install\models\theme_models.py", line 226, in write res = super(IrUiView, other_views).write(vals) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website\models\ir_ui_view.py", line 51, in write return super(View, self).write(vals) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 493, in write res = super(View, self).write(self._compute_defaults(vals)) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3567, in write real_recs._validate_fields(set(vals) - set(inverse_fields)) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 1176, in _validate_fields check(self) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 387, in _check_xml view_def = view.read_combined(['arch']) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 738, in read_combined arch = self.apply_view_inheritance(arch_tree, root.id, self.model) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 687, in apply_view_inheritance source = self.apply_inheritance_specs(source, specs_tree, view_id) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 666, in apply_inheritance_specs self.raise_view_error(str(e), inherit_id) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 614, in raise_view_error raise ValueError(message) ValueError: Element '<field name="date">' cannot be located in parent view Error context: View `stock.inventory.form - stock_inventory_force_date` [view_id: 2026, xml_id: n/a, model: stock.inventory, parent_id: 796] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 624, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 310, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise raise value File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 669, in dispatch result = self._call_function(**self.params) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 350, in _call_function return checked_call(self.db, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 94, in wrapper return f(dbname, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 915, in __call__ return self.method(*args, **kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 515, in response_wrap response = f(*args, **kw) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1326, in call_button action = self._call_kw(model, method, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1314, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 387, in call_kw result = _call_kw_multi(method, model, args, kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 374, in _call_kw_multi result = method(recs, *args, **kwargs) File "<decorator-gen-60>", line 2, in button_immediate_install File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 72, in check_and_log return method(self, *args, **kwargs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 463, in button_immediate_install return self._button_immediate_function(type(self).button_install) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 573, in _button_immediate_function modules.registry.Registry.new(self._cr.dbname, update_module=True) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 423, in load_modules loaded_modules, update_module, models_to_check) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 315, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 225, in load_module_graph load_data(cr, idref, mode, kind='data', package=package, report=report) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 68, in load_data tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 736, in convert_file convert_xml_import(cr, module, fp, idref, mode, noupdate, report) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 803, in convert_xml_import obj.parse(doc.getroot()) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 721, in parse exc_info[2] File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 13, in reraise raise value.with_traceback(tb) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 712, in parse self._tag_root(de) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 674, in _tag_root f(rec) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\convert.py", line 577, in _tag_record record = model._load_records([data], self.mode == 'update') File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 4083, in _load_records records = self._load_records_create([data['values'] for data in to_create]) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3997, in _load_records_create return self.create(values) File "<decorator-gen-32>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 475, in create return super(View, self).create(vals_list) File "<decorator-gen-3>", line 2, in create File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 336, in _model_create_multi return create(self, arg) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3778, in create fields[0].determine_inverse(batch_recs) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\fields.py", line 1120, in determine_inverse getattr(records, self.inverse)() File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 299, in _inverse_arch view.write(data) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website_theme_install\models\theme_models.py", line 226, in write res = super(IrUiView, other_views).write(vals) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\website\models\ir_ui_view.py", line 51, in write return super(View, self).write(vals) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 493, in write res = super(View, self).write(self._compute_defaults(vals)) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 3567, in write real_recs._validate_fields(set(vals) - set(inverse_fields)) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\models.py", line 1176, in _validate_fields check(self) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 387, in _check_xml view_def = view.read_combined(['arch']) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 738, in read_combined arch = self.apply_view_inheritance(arch_tree, root.id, self.model) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 687, in apply_view_inheritance source = self.apply_inheritance_specs(source, specs_tree, view_id) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 666, in apply_inheritance_specs self.raise_view_error(str(e), inherit_id) File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_ui_view.py", line 614, in raise_view_error raise ValueError(message) odoo.tools.convert.ParseError: "Element '<field name="date">' cannot be located in parent view Error context: View `stock.inventory.form - stock_inventory_force_date` [view_id: 2026, xml_id: n/a, model: stock.inventory, parent_id: 796]" while parsing file:/c:/program files (x86)/odoo 13.0/server/odoo/addons/stock_account_inventory_force_date/views/stock_inventory_view.xml:5, near <odoo> <record id="view_inventory_form" model="ir.ui.view"> <field name="name">stock.inventory.form - stock_inventory_force_date</field> <field name="model">stock.inventory</field> <field name="groups_id" eval="[(4, ref('stock_account_inventory_force_date.group_stock_account_inventory_force_date'))]"/> <field name="inherit_id" ref="stock.view_inventory_form"/> <field name="arch" type="xml"> <data><field name="date" position="after"> <field name="force_inventory_date"/> </field> <field name="date" position="attributes"> <attribute name="attrs">{'readonly': ['|', ('force_inventory_date', '!=', True), ('state', '!=', 'draft')]}</attribute> </field> </data></field> </record> </odoo>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
This is the relevant error message:
ValueError: Element '<field name="date">' cannot be located in parent view
Therefore you should adapt the inherited view to the new parent view of Odoo 13.
Thanks Ermin your answer works but I have got the below error again
Error:
Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise
raise value
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 915, in __call__
return self.method(*args, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 515, in response_wrap
response = f(*args, **kw)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1326, in call_button
action = self._call_kw(model, method, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1314, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 387, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 374, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock\models\stock_inventory.py", line 143, in action_start
self._action_start()
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock\models\stock_inventory.py", line 160, in _action_start
self.env['stock.inventory.line'].create(inventory._get_inventory_lines_values())
File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\stock_account_inventory_force_date\models\stock_inventory.py", line 64, in _get_inventory_lines_values
lines = []
AttributeError: 'stock.inventory' object has no attribute 'location_id'
As you can read, this is a very different error message. Please be aware that this is a help forum and not a place to receive one on one parented walk-throughs. If you have a new question, then please post a new question, provide your code, the traceback (error messages) and any useful context information.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Please post the error message itself, which comes before the error context.
Not yet