跳至内容
菜单
此问题已终结
1 回复
88 查看

HI All,

Could someone point me direction in troubleshooting for my problem?

I'm encountering errors while trying to activate the document_management_system and om_account_accountant-18.0.1.0.3 modules on a fresh installation of Odoo 18 Community. I have put the unzipped folders to custom-addons directory, modules appears in app list but i can not activate any module and getting the RPC Errors:

First Error:

Odoo Server Error

RPC_ERROR
Odoo Server Error

Occured on odoo.mydomain.com on model ir.module.module and id 9 on 2025-05-01 08:08:46 GMT

Traceback (most recent call last):
  File "/opt/odoo18/odoo/tools/convert.py", line 554, in _tag_root
    f(rec)
  File "/opt/odoo18/odoo/tools/convert.py", line 454, in _tag_record
    record = model._load_records([data], self.mode == 'update')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4849, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4756, in _load_records_create
    records = self.create(vals_list)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/decorators.py", line 335, in create
    return method(self, vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_actions.py", line 359, in create
    return super().create(vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/decorators.py", line 335, in create
    return method(self, vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_actions.py", line 109, in create
    res = super().create(vals_list)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/decorators.py", line 335, in create
    return method(self, vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4328, in create
    raise ValueError(f"Invalid field {field_name!r} in {self._name!r}")
ValueError: Invalid field 'groups_id' in 'ir.actions.act_window'

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

Traceback (most recent call last):
  File "/opt/odoo18/odoo/http.py", line 2023, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/service/model.py", line 164, in retrying
    result = func()
             ^^^^^^
  File "/opt/odoo18/odoo/http.py", line 1990, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/http.py", line 2252, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_http.py", line 349, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/http.py", line 746, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/addons/web/controllers/dataset.py", line 38, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/service/model.py", line 84, in call_kw
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_module.py", line 67, in check_and_log
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_module.py", line 449, in button_immediate_install
    return self._button_immediate_function(self.env.registry[self._name].button_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/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 "/opt/odoo18/venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/tools/func.py", line 98, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/registry.py", line 165, in new
    load_modules(
  File "/opt/odoo18/odoo/modules/loading.py", line 450, in load_modules
    load_module_graph(
  File "/opt/odoo18/odoo/modules/loading.py", line 220, in load_module_graph
    load_data(env, idref, 'init', kind='data', package=package)
  File "/opt/odoo18/odoo/modules/loading.py", line 79, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo18/odoo/tools/convert.py", line 625, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/opt/odoo18/odoo/tools/convert.py", line 706, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo18/odoo/tools/convert.py", line 611, in parse
    self._tag_root(de)
  File "/opt/odoo18/odoo/tools/convert.py", line 567, in _tag_root
    raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /opt/odoo18/addons/accounting_pdf_reports/wizard/partner_ledger.xml:44, somewhere inside
<record id="action_partner_report_partnerledger" model="ir.actions.act_window">
        <field name="name">Balance Statement (Partner Ledger)</field>
        <field name="res_model">account.report.partner.ledger</field>
        <field name="view_mode">form</field>
        <field name="view_id" ref="account_report_partner_ledger_view"/>
        <field name="target">new</field>
        <field name="binding_model_id" ref="base.model_res_partner"/>
        <field name="binding_type">report</field>
        <field name="context">{
            'default_partner_ids':active_ids,
            'default_target_move': 'posted',
            'default_result_selection': 'customer_supplier',
            'default_reconciled': True,
            'hide_partner':1,
        }</field>
        <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
    </record>

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (odoo.mydomain.com/web/assets/debug/web.assets_web.js:31746:19)
        at XMLHttpRequest.<anonymous> (odoo.mydomain.com/web/assets/debug/web.assets_web.js:31800:27)

Second Error:

Odoo Server Error

RPC_ERROR
Odoo Server Error

Occured on odoo.mydomain.com on model ir.module.module and id 10 on 2025-05-01 08:27:42 GMT

Traceback (most recent call last):
  File "/opt/odoo18/odoo/tools/convert.py", line 554, in _tag_root
    f(rec)
  File "/opt/odoo18/odoo/tools/convert.py", line 454, in _tag_record
    record = model._load_records([data], self.mode == 'update')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4849, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4756, in _load_records_create
    records = self.create(vals_list)
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/decorators.py", line 335, in create
    return method(self, vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/res_groups.py", line 260, in create
    groups = super().create(vals_list)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/decorators.py", line 335, in create
    return method(self, vals_list)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/models.py", line 4328, in create
    raise ValueError(f"Invalid field {field_name!r} in {self._name!r}")
ValueError: Invalid field 'users' in 'res.groups'

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

Traceback (most recent call last):
  File "/opt/odoo18/odoo/http.py", line 2023, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/service/model.py", line 164, in retrying
    result = func()
             ^^^^^^
  File "/opt/odoo18/odoo/http.py", line 1990, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/http.py", line 2252, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_http.py", line 349, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/http.py", line 746, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/addons/web/controllers/dataset.py", line 38, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/service/model.py", line 84, in call_kw
    result = method(recs, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_module.py", line 67, in check_and_log
    return method(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/addons/base/models/ir_module.py", line 449, in button_immediate_install
    return self._button_immediate_function(self.env.registry[self._name].button_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/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 "/opt/odoo18/venv/lib/python3.12/site-packages/decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/tools/func.py", line 98, in locked
    return func(inst, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/odoo18/odoo/orm/registry.py", line 165, in new
    load_modules(
  File "/opt/odoo18/odoo/modules/loading.py", line 450, in load_modules
    load_module_graph(
  File "/opt/odoo18/odoo/modules/loading.py", line 220, in load_module_graph
    load_data(env, idref, 'init', kind='data', package=package)
  File "/opt/odoo18/odoo/modules/loading.py", line 79, in load_data
    tools.convert_file(env, package.name, filename, idref, mode, noupdate, kind)
  File "/opt/odoo18/odoo/tools/convert.py", line 625, in convert_file
    convert_xml_import(env, module, fp, idref, mode, noupdate)
  File "/opt/odoo18/odoo/tools/convert.py", line 706, in convert_xml_import
    obj.parse(doc.getroot())
  File "/opt/odoo18/odoo/tools/convert.py", line 611, in parse
    self._tag_root(de)
  File "/opt/odoo18/odoo/tools/convert.py", line 5

 

形象
丢弃
最佳答案

Odoo 18 Community Edition does not support certain fields like:

  • groups_id on ir.actions.act_window
  • users on res.groups

These fields were valid in older versions or the Enterprise edition but have been removed or refactored in Odoo 18.


1. Fix the groups_id Error (Act Window)

File:

accounting_pdf_reports/wizard/partner_ledger.xml

Problem Block:

<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>

Fix:

Comment it out or remove it:

<!-- <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> -->


2. Fix the users Field Error (res.groups)

Problem Block:

<record id="..." model="res.groups">
    ...
    <field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>

Fix: Remove the users field:

<!-- <field name="users" eval="[(4, ref('base.user_root'))]"/> -->


3. Clear Odoo Cache and Restart

After editing the XML files:


# Stop Odoo
sudo systemctl stop odoo18

# Clear caches and compiled files
find . -name "*.pyc" -delete
rm -rf /opt/odoo18/.local/share/Odoo/filestore/YOUR_DB_NAME

# Restart Odoo
sudo systemctl start odoo18


Final Notes

  • These modules (document_management_system and om_account_accountant) are third-party, not official Odoo 18 CE modules.
  • Many community modules on GitHub or other sources may not yet be Odoo 18 compatible. You’ll often need to:
    • Manually migrate them
    • Test and remove deprecated fields
    • Update manifest files


Error 1 – Invalid field 'groups_id' in 'ir.actions.act_window'

  • The groups_id field has been removed from ir.actions.act_window in Odoo 17+.
  • Removing or commenting that line eliminates the ValueError.


Error 2 – Invalid field 'users' in 'res.groups'

  • The users field is no longer allowed in XML (since it involves runtime objects).
  • Removing it from the XML file stops the error. You can assign users manually or through a post-init script in Python if really needed.


What You Must Do:

To be sure it works:

  1. Edit the XML files (*.xml under /wizard or /security, depending on the error source).
  2. Comment out or delete the lines with:
<field name="groups_id" ... />
<field name="users" ... />

   3. Restart Odoo and update the module list.


Thanks & Regards,

Email :- contact@datainteger.com

形象
丢弃