Skip to Content
Menu
This question has been flagged
4 Replies
3972 Views

I just upgrade my Odoo 13 thanks to Debian package (from december to june version), and I'm getting this error on database upgrade :


~~~
Erreur:
Odoo Server Error

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 664, in apply_inheritance_specs
    pre_locate=pre_locate)
  File "/usr/lib/python3/dist-packages/odoo/tools/template_inheritance.py", line 230, in apply_inheritance_specs
    _("Element '%s' cannot be located in parent view") % tag
ValueError: L'élément '<t t-name="l10n_ch.l10n_ch_swissqr_template">' ne peut être localisé dans la vue parente

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 652, in _tag_template
    return self._tag_record(record)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 577, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4053, in _load_records
    data['record']._load_records_write(data['values'])
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1374, in _load_records_write
    super(View, self)._load_records_write(values)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3991, in _load_records_write
    self.write(values)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 493, in write
    res = super(View, self).write(self._compute_defaults(vals))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3569, in write
    fields[0].determine_inverse(real_recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1120, in determine_inverse
    getattr(records, self.inverse)()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
    view.write(data)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 493, in write
    res = super(View, self).write(self._compute_defaults(vals))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3564, in write
    real_recs._validate_fields(set(vals) - set(inverse_fields))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1176, in _validate_fields
    check(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 387, in _check_xml
    view_def = view.read_combined(['arch'])
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 666, in apply_inheritance_specs
    self.raise_view_error(str(e), inherit_id)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
    raise ValueError(message)
ValueError: L'élément '<t t-name="l10n_ch.l10n_ch_swissqr_template">' ne peut être localisé dans la vue parente

Contexte de l'erreur :
Vue `l10n_ch_swissqr_template`
[view_id: 724, xml_id: l10n_ch.l10n_ch_swissqr_template, model: n/a, parent_id: 629]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1326, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1314, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 374, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-65>", line 2, in button_immediate_upgrade
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 72, in check_and_log
    return method(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 634, in button_immediate_upgrade
    return self._button_immediate_function(type(self).button_upgrade)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_module.py", line 573, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 419, in load_modules
    force, status, report, loaded_modules, update_module, models_to_check)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 315, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 225, in load_module_graph
    load_data(cr, idref, mode, kind='data', package=package, report=report)
  File "/usr/lib/python3/dist-packages/odoo/modules/loading.py", line 68, in load_data
    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 736, in convert_file
    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 803, in convert_xml_import
    obj.parse(doc.getroot())
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 721, in parse
    exc_info[2]
  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 712, in parse
    self._tag_root(de)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 674, in _tag_root
    f(rec)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 652, in _tag_template
    return self._tag_record(record)
  File "/usr/lib/python3/dist-packages/odoo/tools/convert.py", line 577, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 4053, in _load_records
    data['record']._load_records_write(data['values'])
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 1374, in _load_records_write
    super(View, self)._load_records_write(values)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3991, in _load_records_write
    self.write(values)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 493, in write
    res = super(View, self).write(self._compute_defaults(vals))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3569, in write
    fields[0].determine_inverse(real_recs)
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1120, in determine_inverse
    getattr(records, self.inverse)()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 299, in _inverse_arch
    view.write(data)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 493, in write
    res = super(View, self).write(self._compute_defaults(vals))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3564, in write
    real_recs._validate_fields(set(vals) - set(inverse_fields))
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1176, in _validate_fields
    check(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 387, in _check_xml
    view_def = view.read_combined(['arch'])
  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 666, in apply_inheritance_specs
    self.raise_view_error(str(e), inherit_id)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
    raise ValueError(message)
odoo.tools.convert.ParseError: "L'élément '<t t-name="l10n_ch.l10n_ch_swissqr_template">' ne peut être localisé dans la vue parente

Contexte de l'erreur :
Vue `l10n_ch_swissqr_template`
[view_id: 724, xml_id: l10n_ch.l10n_ch_swissqr_template, model: n/a, parent_id: 629]" while parsing /usr/lib/python3/dist-packages/odoo/addons/l10n_ch/report/swissqr_report.xml:2, near
<odoo>
    <data>

        <report id="l10n_ch_qr_report" model="account.move" report_type="qweb-pdf" string="QR-bill" name="l10n_ch.qr_report_main" file="l10n_ch.qr_report_main" attachment="'QR-bill-' + object.name + '.pdf'" menu="False" print_report_name="'QR-bill-%s' % object.name" paperformat="l10n_ch.paperformat_euro_no_margin"/>

        <template id="l10n_ch.qr_report_main">
            <t t-call="web.html_container">
                <t t-foreach="docs" t-as="invoice">
                    <t t-set="o" t-value="invoice"/>
                    <t t-call="l10n_ch.l10n_ch_swissqr_template"/>
                </t>
            </t>
        </template>
    </data>
</odoo>

~~~


Any idea what causes this issue ?

Avatar
Discard
Author

Thanks Paresh for your anwser !

This module is marked as installed and if I try to click on "Upgrade" it provides the same error !

The module is physically available on /usr/lib/python3/dist-packages/odoo/addons/l10n_ch.

This could be a bug. You may want to log a bug report at https://github.com/odoo/odoo/issues

Author

I cannot post my solution here, here the bug report and the fix.

https://github.com/odoo/odoo/issues/53822

Best Answer

The error indicates that the view "l10n_ch.l10n_ch_swissqr_template" is missing due to which Odoo is not able to call the template. Check whether the "Switzerland - Accounting" module is installed correctly.

Avatar
Discard
Related Posts Replies Views Activity
2
Apr 24
877
0
Mar 23
1662
0
Aug 22
1269
0
Nov 20
8489
1
Dec 17
14494