Everything was running fine, but when I choose a new database and try to install/activate the module again this error was coming, prior it was working fine when I changed some views of different models.
This is the code where parse error is :
Its a form view with chatter.
<record id="office_employee_view_form" model="ir.ui.view"> <field name="name">office.employee.view.formfield> <field name="model">office.employeefield> <field name="arch" type="xml"> <form string="Office_Employee_Form_View"> <sheet> <group> <group> <field name="name" help="Name of the employee" icon="fa-solid fa-user" /> <field name="age" icon="fa-solid fa-input-numeric" /> <field name="b_date" icon="fa-solid fa-cake-candles" /> group> <group> <field name="department" icon="fa-solid fa-briefcase" /> <field name="gender" icon="fa-duotone fa-person-half-dress" /> <button string="Female Employee" name="%(employee.office_employee_female_action)d" confirm="Are u sure want to view female employee ?" help="By clicking this button you will see female employee" type="action" class="oe_highlight" /> <button string="Male Employee" name="%(employee.office_employee_male_action)d" type="action" class="oe_highlight" /> <field name="active" invisible="true" /> group> group> <notebook> <page name="employee_work_info_company" string="Company Information" > <field name="employee_more_details"> <tree editable="bottom" widget='section_and_note_one2many' > <control> <create string='Add more detail' /> control> <field name="company_name" icon="fa-solid fa-buildings" /> <field name="work_location" icon="fa-solid fa-location-dot" /> <field name="work_phone" icon="fa-solid fa-phone-volume" /> <field name="work_email" icon="fa-solid fa-envelope" /> tree> field> page> <page name="emp_hobby" string="Employee Hobby"> <form> <group> <field name="emp_hobby" widget="many2many_tags" icon="fa-solid fa-teddy-bear" /> group> form> page> notebook> sheet> <div class="oe_chatter"> <field name="message_follower_ids" widget="mail_followers" /> <field name="activity_ids" widget="mail_activity" /> <field name="message_ids" widget="mail_thread" /> div> form> field> record>
Error Log:
RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "V:\Odoo\server\odoo\tools\cache.py", line 85, in lookup
r = d[key]
File "", line 2, in __getitem__
File "V:\Odoo\server\odoo\tools\func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "V:\Odoo\server\odoo\tools\lru.py", line 34, in __getitem__
a = self.d[obj]
KeyError: ('ir.model.data', , 'employee.office_employee_female_action')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "V:\Odoo\server\odoo\tools\convert.py", line 698, in _tag_root
f(rec)
File "V:\Odoo\server\odoo\tools\convert.py", line 573, in _tag_record
f_val = _eval_xml(self, field, env)
File "V:\Odoo\server\odoo\tools\convert.py", line 143, in _eval_xml
+_process("".join(etree.tostring(n, encoding='unicode') for n in node))
File "V:\Odoo\server\odoo\tools\convert.py", line 132, in _process
self.idref[id] = self.id_get(id)
File "V:\Odoo\server\odoo\tools\convert.py", line 681, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "V:\Odoo\server\odoo\tools\convert.py", line 687, in model_id_get
return self.env['ir.model.data']._xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "V:\Odoo\server\odoo\addons\base\models\ir_model.py", line 2018, in _xmlid_to_res_model_res_id
return self._xmlid_lookup(xmlid)[1:3]
File "", line 2, in _xmlid_lookup
File "V:\Odoo\server\odoo\tools\cache.py", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "V:\Odoo\server\odoo\addons\base\models\ir_model.py", line 2011, in _xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: employee.office_employee_female_action
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "V:\Odoo\server\odoo\http.py", line 1579, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "V:\Odoo\server\odoo\service\model.py", line 134, in retrying
result = func()
File "V:\Odoo\server\odoo\http.py", line 1608, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "V:\Odoo\server\odoo\http.py", line 1805, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "V:\Odoo\server\odoo\addons\base\models\ir_http.py", line 144, in _dispatch
result = endpoint(**request.params)
File "V:\Odoo\server\odoo\http.py", line 698, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "V:\Odoo\server\odoo\addons\web\controllers\dataset.py", line 46, in call_button
action = self._call_kw(model, method, args, kwargs)
File "V:\Odoo\server\odoo\addons\web\controllers\dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "V:\Odoo\server\odoo\api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "V:\Odoo\server\odoo\api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_install
File "V:\Odoo\server\odoo\addons\base\models\ir_module.py", line 76, in check_and_log
return method(self, *args, **kwargs)
File "V:\Odoo\server\odoo\addons\base\models\ir_module.py", line 491, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "V:\Odoo\server\odoo\addons\base\models\ir_module.py", line 615, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "", line 2, in new
File "V:\Odoo\server\odoo\tools\func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "V:\Odoo\server\odoo\modules\registry.py", line 91, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "V:\Odoo\server\odoo\modules\loading.py", line 484, in load_modules
loaded_modules, update_module, models_to_check)
File "V:\Odoo\server\odoo\modules\loading.py", line 373, in load_marked_modules
perform_checks=perform_checks, models_to_check=models_to_check
File "V:\Odoo\server\odoo\modules\loading.py", line 230, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "V:\Odoo\server\odoo\modules\loading.py", line 71, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "V:\Odoo\server\odoo\tools\convert.py", line 763, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "V:\Odoo\server\odoo\tools\convert.py", line 829, in convert_xml_import
obj.parse(doc.getroot())
File "V:\Odoo\server\odoo\tools\convert.py", line 749, in parse
self._tag_root(de)
File "V:\Odoo\server\odoo\tools\convert.py", line 715, in _tag_root
)) from e
odoo.tools.convert.ParseError: while parsing file:/v:/odoo/server/module/office_management_odoo/employee/views/office_emp.xml:23, somewhere inside
" rel="ugc">ir.ui.view">
office.employee.view.form
office.employee
The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (http://localhost:8888/web/assets/debug/web.assets_backend.js:10165:19) (/web/static/src/core/network/rpc_service.js:34)
at XMLHttpRequest. (http://localhost:8888/web/assets/debug/web.assets_backend.js:10218:27) (/web/static/src/core/network/rpc_service.js:87)