Skip to content

[18.0][FIX] edi_storage_oca: add event listener#226

Open
ArnauCForgeFlow wants to merge 1 commit intoOCA:18.0from
ForgeFlow:18.0-edi_storage_oca-add_listener
Open

[18.0][FIX] edi_storage_oca: add event listener#226
ArnauCForgeFlow wants to merge 1 commit intoOCA:18.0from
ForgeFlow:18.0-edi_storage_oca-add_listener

Conversation

@ArnauCForgeFlow
Copy link

During the migration of edi_storage_oca to the new EDI version, the listener that executes once the EDI record has been processed was omitted.

Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Can you add a test case to avoid regressions again?

@ArnauCForgeFlow ArnauCForgeFlow force-pushed the 18.0-edi_storage_oca-add_listener branch 2 times, most recently from ed161b3 to 6514a45 Compare January 29, 2026 12:33
"website": "https://github.com/OCA/edi-framework",
"author": "ACSONE,Odoo Community Association (OCA)",
"depends": ["edi_core_oca", "fs_storage"],
"depends": ["edi_core_oca", "fs_storage", "edi_component_oca"],
Copy link
Contributor

Choose a reason for hiding this comment

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

@etobella Could we ask for your opinion here? there was a regression, but to revert it we need a new dependency... not sure if you would prefer this in a glue module. Thoughts?

@ArnauCForgeFlow ArnauCForgeFlow force-pushed the 18.0-edi_storage_oca-add_listener branch from 6514a45 to 652524c Compare January 29, 2026 12:35
@ArnauCForgeFlow ArnauCForgeFlow force-pushed the 18.0-edi_storage_oca-add_listener branch from 652524c to 6ecf880 Compare January 29, 2026 14:22
@ArnauCForgeFlow
Copy link
Author

@LoisRForgeFlow tests added

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

If you need a component, you should add a new module (glue module)

@etobella
Copy link
Member

Silly question, can you get the same result without components?

@ArnauCForgeFlow
Copy link
Author

I am using this module together with document_quick_access_folder_auto_classification, which is responsible for processing the file. I added the listener to the edi_storage_oca module because I understand it to be a generic behavior that should be used for all records that use the edi_storage_oca backend.

It works because the document_quick_access_folder_auto_classification module adds edi_component_oca, so I assume that the listener does not work on its own unless the component dependency is added.

@etobella
Copy link
Member

Yes, but that's because I did not had the time to remove the dependency 😉

@ArnauCForgeFlow
Copy link
Author

So, your suggestion is create a glue module with the listenner and the component dependency?

@etobella
Copy link
Member

my suggestion would be:

1- Can we do it without components? If yes, do it
2- If no, make a glue module

@simahawk
Copy link
Contributor

simahawk commented Feb 3, 2026

Short term, I would:

  • move _trigger_edi_event_make_name from the component module to core
  • hook to _trigger_edi_event to do what you need

Long term, this makes me think that we should probably have an explicit handler for state transition on the type.
Something like state_change_handler_model_id. With that we can:

  • move _trigger_edi_event_make_name from the component module to core
  • modify _trigger_edi_event to do look for this handler and make it call the right on_* method

Opinions?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants