Skip to content

[18.0][FIX] res not initialized#248

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
camptocamp:18.0-fix-res-not-initialized
Mar 12, 2026
Merged

[18.0][FIX] res not initialized#248
OCA-git-bot merged 1 commit intoOCA:18.0from
camptocamp:18.0-fix-res-not-initialized

Conversation

@wouitmil
Copy link

@wouitmil wouitmil commented Mar 12, 2026

If we face EDINotImplementedError in exchange_process res is not initialized.

Traceback (most recent call last):
  File "/odoo/external-src/edi-framework/edi_core_oca/models/edi_backend.py", line 461, in exchange_process
    res = self._exchange_process(exchange_record)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/external-src/edi-framework/edi_core_oca/models/edi_backend.py", line 501, in _exchange_process
    exchange_function = self._get_exec_handler(exchange_record, "process")
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/external-src/edi-framework/edi_core_oca/models/edi_backend.py", line 685, in _get_exec_handler
    raise EDINotImplementedError(
odoo.addons.edi_core_oca.exceptions.EDINotImplementedError: No handler for process

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo/external-src/queue/queue_job/controllers/main.py", line 116, in runjob
    self._try_perform_job(env, job)
  File "/odoo/external-src/queue/queue_job/controllers/main.py", line 39, in _try_perform_job
    job.perform()
  File "/odoo/external-src/queue/queue_job/job.py", line 495, in perform
    self.result = self.func(*tuple(self.args), **self.kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/external-src/queue/queue_job/models/base.py", line 216, in auto_delay_wrapper
    return auto_delay_wrapper.origin(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/external-src/edi-framework/edi_core_oca/models/edi_exchange_record.py", line 444, in action_exchange_process
    return self.backend_id.exchange_process(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/odoo/external-src/edi-framework/edi_core_oca/models/edi_backend.py", line 478, in exchange_process
    if res != "__sql_error__":
       ^^^
UnboundLocalError: cannot access local variable 'res' where it is not associated with a value

@OCA-git-bot
Copy link
Contributor

Hi @simahawk, @etobella,
some modules you are maintaining are being modified, check this out!

@wouitmil wouitmil changed the title [18.0][DIW] res not initialized [18.0][FIX] res not initialized Mar 12, 2026
Copy link

@vvrossem vvrossem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains 35 commits: I think rebasing is needed

@wouitmil
Copy link
Author

This PR contains 35 commits: I think rebasing is needed

OUUUUUUUPS

@wouitmil wouitmil force-pushed the 18.0-fix-res-not-initialized branch from a7d762a to 0e5e358 Compare March 12, 2026 09:02
@simahawk
Copy link
Contributor

the commit msg would need some love ;)

@wouitmil wouitmil force-pushed the 18.0-fix-res-not-initialized branch from 0e5e358 to e005906 Compare March 12, 2026 10:24
@wouitmil wouitmil force-pushed the 18.0-fix-res-not-initialized branch from e005906 to fe331cf Compare March 12, 2026 10:25
@simahawk
Copy link
Contributor

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-248-by-simahawk-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 0882501 into OCA:18.0 Mar 12, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at c400231. Thanks a lot for contributing to OCA. ❤️

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants