Issue for bi_hr_employee_loan (#1,643)
Status: OPEN
Date: 05/07/2021
ID: 1,643
S/O number: SO2021/1412680
Reviewer: Hiral Bhatt
Module Name: bi_hr_employee_loan
Version: 14.0

Assigned to
Hanee Patel

Hello !

I am getting the below error message when trying to install this module on my Odoo v14 EE:

Odoo Server Error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/", line 85, in lookup
r = d[key]
File "/usr/lib/python3/dist-packages/odoo/tools/", line 71, in wrapper
return func(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/tools/", line 34, in __getitem__
a = self.d[obj]
KeyError: ('', <function IrModelData.xmlid_lookup at 0x7f37e167e310>, 'hr_payroll.structure_002')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/tools/", line 677, in _tag_root
File "/usr/lib/python3/dist-packages/odoo/tools/", line 564, in _tag_record
f_val = self.id_get(f_ref)
File "/usr/lib/python3/dist-packages/odoo/tools/", line 660, in id_get
res = self.model_id_get(id_str, raise_if_not_found)
File "/usr/lib/python3/dist-packages/odoo/tools/", line 666, in model_id_get
return self.env[''].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 1885, in xmlid_to_res_model_res_id
return self.xmlid_lookup(xmlid)[1:3]
File "<decorator-gen-35>", line 2, in xmlid_lookup
File "/usr/lib/python3/dist-packages/odoo/tools/", line 90, in lookup
value = d[key] = self.method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 1878, in xmlid_lookup
raise ValueError('External ID not found in the system: %s' % xmlid)
ValueError: External ID not found in the system: hr_payroll.structure_002
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 237, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/", line 683, in dispatch
result = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/", line 359, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/", line 347, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/", line 912, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/", line 531, in response_wrap
response = f(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/", line 1381, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/", line 1369, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/", line 396, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/usr/lib/python3/dist-packages/odoo/", line 383, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-71>", line 2, in button_immediate_install
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 73, in check_and_log
return method(self, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 474, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/", line 592, in _button_immediate_function, update_module=True)
File "/usr/lib/python3/dist-packages/odoo/modules/", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/usr/lib/python3/dist-packages/odoo/modules/", line 453, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/usr/lib/python3/dist-packages/odoo/modules/", line 346, in load_marked_modules
loaded, processed = load_module_graph(
File "/usr/lib/python3/dist-packages/odoo/modules/", line 221, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/usr/lib/python3/dist-packages/odoo/modules/", line 69, in load_data
tools.convert_file(cr,, filename, idref, mode, noupdate, kind)
File "/usr/lib/python3/dist-packages/odoo/tools/", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/usr/lib/python3/dist-packages/odoo/tools/", line 799, in convert_xml_import
File "/usr/lib/python3/dist-packages/odoo/tools/", line 719, in parse
File "/usr/lib/python3/dist-packages/odoo/tools/", line 677, in _tag_root
File "/usr/lib/python3/dist-packages/odoo/tools/", line 681, in _tag_root
raise ParseError('while parsing %s:%s, near\n%s' % (
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/", line 639, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/", line 315, in _handle_exception
raise exception.with_traceback(None) from new_cause while parsing /usr/lib/python3/dist-packages/odoo/addons/bi_hr_employee_loan/views/loan_rules.xml:6, near
<record id="hr_loan_installment_rule" model="hr.salary.rule">
<field name="name">Installment Loan</field>
<field name="sequence" eval="300"/>
<field name="code">INSTALLMENT</field>
<field name="category_id" ref="hr_payroll.DED"/>
<field name="condition_select">none</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">result = -employee.get_installment_loan(,payslip.date_from,payslip.date_to)</field>
<field name="struct_id" ref="hr_payroll.structure_002"/>

I have tested the old version on my odoo v14 Enterprise edition and it is working. But I don't have access to these option in loan type form:
- Option for Repayment Method : Deduction From Payroll Or Direct Cash/Cheque.
- Option for Disburse Method : Through Payroll Or Direct Cash/Cheque.

I have installed a new odoo database v14 Enterprise edition and try to install your latest version of app "" and I still getting the error describe in my previous message.

So please get access to my database for support:
- link:
- username: support
- password: test123

Message and communication history