Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
4 Ответы
2610 Представления
Traceback (most recent call last):
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 556, in _tag_root
    f(rec)
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 456, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/opt/odoo17/odoo/odoo/models.py", line 5029, in _load_records
    data['record']._load_records_write(data['values'])
  File "/opt/odoo17/odoo/addons/mail/models/template_reset_mixin.py", line 55, in _load_records_write
    return super()._load_records_write(values)
  File "/opt/odoo17/odoo/odoo/models.py", line 4960, in _load_records_write
    self.write(values)
  File "/opt/odoo17/odoo/addons/mail/models/mail_template.py", line 171, in write
    super().write(vals)
  File "/opt/odoo17/odoo/addons/mail/models/mail_render_mixin.py", line 102, in write
    super().write(vals)
  File "/opt/odoo17/odoo/odoo/models.py", line 4324, in write
    raise ValueError("Invalid field %r on model %r" % (fname, self._name))
ValueError: Invalid field 'report_template' on model 'mail.template'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo17/odoo/odoo/http.py", line 1722, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo17/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo17/odoo/odoo/http.py", line 1749, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo17/odoo/odoo/http.py", line 1953, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo17/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/opt/odoo17/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo17/odoo/odoo/http.py", line 722, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo17/odoo/addons/web/controllers/dataset.py", line 28, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo17/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo17/odoo/odoo/api.py", line 466, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo17/odoo/odoo/api.py", line 453, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "", line 2, in button_immediate_upgrade
  File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 650, in button_immediate_upgrade
    return self._button_immediate_function(type(self).button_upgrade)
  File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 583, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "", line 2, in new
  File "/opt/odoo17/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/opt/odoo17/odoo/odoo/modules/registry.py", line 113, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/opt/odoo17/odoo/odoo/modules/loading.py", line 476, in load_modules
    processed_modules += load_marked_modules(env, graph,
  File "/opt/odoo17/odoo/odoo/modules/loading.py", line 364, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/opt/odoo17/odoo/odoo/modules/loading.py", line 227, in load_module_graph
    load_data(env, idref, mode, kind='data', package=package)
  File "/opt/odoo17/odoo/odoo/modules/loading.py", line 71, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 627, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 693, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 613, in parse
    self._tag_root(de)
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 556, in _tag_root
    f(rec)
  File "/opt/odoo17/odoo/odoo/tools/convert.py", line 569, in _tag_root
    raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo17/odoo/addons/gb_hr_payroll_community/views/email_template.xml:4, somewhere inside


            PAY SLIP EMAIL TEMPLATE

            

	    

            

                


Dear,
,
Please find attached your pay slip.

If you have any questions or concerns regarding your pay, please contact your HR representative.

Thank you for your hard work and dedication to our company.



Best regards,

HR Department


Аватар
Отменить
Лучший ответ

Hello,

As in Odoo17 in mail.template "report_template" field does not exist.

instead of this use "report_template_ids"

Please see attached image.



Аватар
Отменить
Лучший ответ

Hii Cruz,

Just replace field report_template with report_template_ids


Thanks

Аватар
Отменить
Лучший ответ

Hi Cruz,

The error traceback you encountered indicates an issue while parsing the XML file hr_salary_rule_views.xml at line 42. It seems there's an error within a tag, possibly related to field definitions or view configurations.

To resolve this issue:

  1. Review XML Structure: Double-check the XML structure in hr_salary_rule_views.xml to ensure it aligns with Odoo's XML format guidelines. Pay close attention to syntax errors or misplaced elements.
  2. Field Definitions: Verify the correctness of field definitions within the tag. Ensure that all fields referenced exist in the appropriate model and are spelled correctly.
  3. Contextual Check: If the error persists, consider the context in which this XML file is used. Review any related Python files, particularly where models or views are defined, to ensure consistency between the XML and Python definitions.
  4. Debugging: If necessary, use logging or debugging techniques to trace the origin of the error. Check for any related custom modules or addons that might interact with the affected XML file.
  5. Testing: Make sure to test your changes thoroughly after making corrections to ensure the issue is resolved without introducing new errors

Hope it helps

Аватар
Отменить
Лучший ответ

Hi,
If you have made any changes inside the email templates, just reset it to default values and try. Depending on were you get the error, you can easily trace which template is causing the issue.

Thanks

Аватар
Отменить
Автор

I reversed the changes. Later new errors are appeared.

Traceback (most recent call last):
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 456, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/opt/odoo17/odoo/odoo/models.py", line 5029, in _load_records
data['record']._load_records_write(data['values'])
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_ui_view.py", line 2138, in _load_records_write
super(View, self)._load_records_write(values)
File "/opt/odoo17/odoo/odoo/models.py", line 4960, in _load_records_write
self.write(values)
File "/opt/odoo17/odoo/addons/website/models/theme_models.py", line 375, in write
res = super(IrUiView, other_views).write(vals)
File "/opt/odoo17/odoo/addons/website/models/ir_ui_view.py", line 95, in write
return super(View, self).write(vals)
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_ui_view.py", line 524, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/opt/odoo17/odoo/odoo/models.py", line 4324, in write
raise ValueError("Invalid field %r on model %r" % (fname, self._name))
ValueError: Invalid field 'field_parent' on model 'ir.ui.view'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/odoo17/odoo/odoo/http.py", line 1722, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo17/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo17/odoo/odoo/http.py", line 1749, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo17/odoo/odoo/http.py", line 1953, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo17/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo17/odoo/odoo/http.py", line 722, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo17/odoo/addons/web/controllers/dataset.py", line 28, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo17/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo17/odoo/odoo/api.py", line 466, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo17/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-83>", line 2, in button_immediate_upgrade
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 75, in check_and_log
return method(self, *args, **kwargs)
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 650, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/opt/odoo17/odoo/odoo/addons/base/models/ir_module.py", line 583, in _button_immediate_function
registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "<decorator-gen-16>", line 2, in new
File "/opt/odoo17/odoo/odoo/tools/func.py", line 87, in locked
return func(inst, *args, **kwargs)
File "/opt/odoo17/odoo/odoo/modules/registry.py", line 113, in new
odoo.modules.load_modules(registry, force_demo, status, update_module)
File "/opt/odoo17/odoo/odoo/modules/loading.py", line 476, in load_modules
processed_modules += load_marked_modules(env, graph,
File "/opt/odoo17/odoo/odoo/modules/loading.py", line 364, in load_marked_modules
loaded, processed = load_module_graph(
File "/opt/odoo17/odoo/odoo/modules/loading.py", line 227, in load_module_graph
load_data(env, idref, mode, kind='data', package=package)
File "/opt/odoo17/odoo/odoo/modules/loading.py", line 71, in load_data
tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 627, in convert_file
convert_xml_import(env, module, fp, idref, mode, noupdate)
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 693, in convert_xml_import
obj.parse(doc.getroot())
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 613, in parse
self._tag_root(de)
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 556, in _tag_root
f(rec)
File "/opt/odoo17/odoo/odoo/tools/convert.py", line 569, in _tag_root
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo17/odoo/addons/gb_hr_payroll_community/views/hr_salary_rule_views.xml:42, somewhere inside
<record id="view_hr_payroll_structure_tree" model="ir.ui.view">
<field name="name">hr.payroll.structure.tree</field>
<field name="model">hr.payroll.structure</field>
<field name="field_parent">children_ids</field>
<field name="arch" type="xml">
<tree string="Salary Structure">
<field name="name"/>
<field name="code"/>
<field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/>
</tree>
</field>
</record>