Repository navigation
[20.0][MIG] edi_core_oca: Migration to 20.0 - #377
Open
HviorForgeFlow wants to merge 396 commits into
Open
HviorForgeFlow wants to merge 396 commits into
HviorForgeFlow wants to merge 396 commits into
Conversation
This was referenced Oct 21, 2026
Prior to this change jobs were tied to the backend. The backend must be responsible for processing records and this is why the logic has been implemented there and it's kept there with this change too. However, it's way better if the job is tied to its record directly because it makes more sense and it helps jumping to the record w/ the 'related' btn on the job.
Makes little sense to show backends first when you enter the EDI menu. Ongoing exchanges are the most important thing.
We want to keep functionality on the same version. It is marked to remove for 16
By setting specific timezone and datetime format on exchange type advanced settings, we can easily override the datetime used for generation of exchange record filename.
Co-authored-by: etobella
Co-authored-by: Núria Sancho <nuria.sancho@creublanca.es>
Not all components might be bound to an exchange record.
* auto btns on/off flag per exchange type * offer hook to customize how btns are rendered * improve UI
Raise specific error when exchange type is not found.
…records Add configurable auto-archiving and auto-deletion of EDI exchange records per backend. This backend-specific settings that can be managed individually. Changes: - Add "Auto Cleanup" tab in backend form view for easy configuration - Add archive cron job that respect backend-specific retention policies - Add delete cron job that respect backend-specific retention policies - Add "Archived" filter to exchange record search view Benefits: - Each backend can have different retention policies - Setting fields to 0 (default value) disables the respective cleanup behavior - More flexible data retention management - Better control over storage and performance optimization The cron jobs iterate through backends with configured retention settings, applying appropriate cutoff values. chore(edi_core_oca): update documentation
Ensure the conf and the env on the record is loaded properly when the handler is initialized.
You can finally jump from a type to its existing records.
Currently translated at 100.0% (286 of 286 strings) Translation: edi-framework-19.0/edi-framework-19.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_core_oca/it/
When using edi_notification_oca, EDI exchanges that failed during send,
receive, or validation did not trigger any notification, leaving errors
unnoticed and requiring manual detection.
The backend only emitted "on_edi_exchange_error" on the process error
path. Other error paths updated the state and posted chatter messages
but did not fire the event.
This change ensures the error event is emitted on all error transitions:
exchange_send -> _notify_error("send_ko")
exchange_receive -> _notify_error("receive_ko", "validate_ko")
exchange_generate -> _notify_error("validate_ko")
Calls are guarded by state changes to avoid duplicate notifications.
Redundant chatter messages are removed since _notify_error already
handles logging and event emission.
Make `env` directly available in `edi.configuration` snippets, alongside the existing `record`, `conf`, `user` and `uid` helpers. Snippets no longer need to reach for `record.env` to access the environment, which keeps them shorter and consistent with the context shared via `env.context`.
Some errors such as ValueError, FileNotFoundError, exceptions.UserError, exceptions.ValidationError, are caught, never re-raised, and the transaction is finally committed. Which means a UserError/ValidationError gets committed, leading to corruption of the processed data.
Currently translated at 100.0% (286 of 286 strings) Translation: edi-framework-19.0/edi-framework-19.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_core_oca/da/
Currently translated at 100.0% (286 of 286 strings) Translation: edi-framework-19.0/edi-framework-19.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_core_oca/sv/
…type handlers are configured
The new _check_direction_handlers constraint broke installation with demo data and several test suites. Add edi.oca.handler.noop in edi_core_oca, reference it from the affected demo exchange types, and make test exchange types default to it when no handler is registered.
Currently translated at 100.0% (290 of 290 strings) Translation: edi-framework-19.0/edi-framework-19.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_core_oca/it/
Add on_cron_hourly and on_cron_daily triggers, fired by scheduled actions of the same period. They carry no originating record, so each configuration resolves its own targets: a global one runs once, any other runs against the records linked to it through a many2many on its model. That lookup is now shared with action_view_partners, which went through the relation tables directly and assumed every many2many linking res.partner to edi.configuration named its columns partner_id and conf_id.
Currently translated at 100.0% (290 of 290 strings) Translation: edi-framework-19.0/edi-framework-19.0-edi_core_oca Translate-URL: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_core_oca/it/
An input record was received and then left for the next run of the input cron to be processed, up to an hour later. Chain the two the way generate and send already are, so a document is processed as soon as it lands.
Introduces a new class to wrap ``_exchange_$action`` methods. It stores the methods' results and a message allowing further customization.
EdiExchangeConsumerMixin.get_view() rebuilds the form arch to inject the EDI buttons, then serializes it back with etree.tostring(doc) without encoding="unicode". lxml's tostring() defaults to bytes in that case, while every other get_view() override in Odoo core and elsewhere in this codebase explicitly passes encoding="unicode" to keep the result a str, matching what ir.ui.view.get_view() itself returns. Any caller that does a plain string operation on the returned arch (e.g. `"foo" in result["arch"]`) breaks with `TypeError: a bytes-like object is required, not 'str'` for any model inheriting this mixin, as soon as its form view has at least one <sheet> without an ancestor <field>.
The exchange notification reads the path of window actions, which only admins can read: posting it as any other user raised an AccessError.
HviorForgeFlow
force-pushed
the
20.0-mig-edi_core_oca
branch
from
October 21, 2026 11:46
87690d0 to
6dc3848
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standard migration + some improvements:
ir.model.accessandir.ruleare merged intoir.access(core19.4-00-ir-accessscript), record rules are now accesses with a domainexchange_fileis written withBinaryBytesand read with.content,_set_file_content/_get_file_contentkeep their signature and existing checksums stay validget_formview_action()replaced by_get_records_action()Queryimported fromodoo.orm.querytests/test_frontend.py, coreWebSuitealready runs the hoot testsAnything writing
exchange_filewithbase64.b64encode(...)bytes has to pass a str or aBinaryBytesnow.Depends on:
CC @ForgeFlow