Skip to content

[account_chart_update] Wizard error on Fiscal packages Saudi Arabia (l10n_sa) and UAE (l10n_ae) #2373

Description

@git-pure

Module

account_chart_update

Describe the bug

In Odoo 18 CE, when running account_chart_update wizard with Saudi Arabia or UAE fiscal package, with "update accounts" option selected, the module runs into an error 'int' object is not iterable, pointing to line 622 of wizard_chart_update.py.

Odoo Server Error

RPC_ERROR
Odoo Server Error

Occured on 192.168.2.116:8069 on model wizard.update.charts.accounts on 2026-08-13 17:45:29 GMT

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2167, in _transactioning
    return service_model.retrying(func, env=self.env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 157, in retrying
    result = func()
             ^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2134, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 2382, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 333, in _dispatch
    result = endpoint(**request.params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 754, in route_wrapper
    result = endpoint(self, *args, **params_ok)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_button
    action = call_kw(request.env[model], method, args, kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 535, in call_kw
    result = getattr(recs, name)(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/account_chart_update/wizard/wizard_chart_update.py", line 479, in action_find_records
    self._find_accounts(t_data["account.account"])
  File "/usr/lib/python3/dist-packages/odoo/addons/account_chart_update/wizard/wizard_chart_update.py", line 913, in _find_accounts
    notes = self.diff_notes(r_data, account)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/account_chart_update/wizard/wizard_chart_update.py", line 709, in diff_notes
    .diff_fields(record_values, real)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/addons/account_chart_update/wizard/wizard_chart_update.py", line 622, in diff_fields
    record_value_compare += record_value_item[2]
TypeError: 'int' object is not iterable

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://192.168.2.116:8069/web/assets/f4ce0a6/web.assets_web.min.js:3175:165)
        at XMLHttpRequest.<anonymous> (http://192.168.2.116:8069/web/assets/f4ce0a6/web.assets_web.min.js:3181:13)

To Reproduce

Odoo 18 CE:
Steps to reproduce the behavior:

  1. Goto Invoicing > Configuration >Settings
  2. Confirm that Fiscal Localization is either "Saudi Arabia" or "UAE"
  3. Click "Update Chart of Accounts"
  4. Confirm that "Update Accounts" is selected.
  5. Click "Next"
    This is where the module runs into an error.

Expected behavior
Wizard expected to run without error.

Additional context
When lines 64 onwards are removed from l10n_sa/models/template_sa.py the problem disappears. The problem also disappears when "update accounts" is deselected in the wizard.

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions