-
-
Notifications
You must be signed in to change notification settings - Fork 51
[19.0][MIG] edi_purchase_oca: Migration to 19.0 #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yankinmax
wants to merge
12
commits into
OCA:19.0
Choose a base branch
from
camptocamp:19.0-mig-edi_purchase_oca
base: 19.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ee8b64e
[ADD] edi_purchase_oca
LoisRForgeFlow c941e7b
[MIG] edi_purchase_oca: Migration to 14.0
sebalix fe3e1e1
edi_purchase: use edi.configuration
simahawk c66e5c7
edi_purchase_oca: improve view space
simahawk c125972
Added translation using Weblate (Spanish)
Ivorra78 1760442
[IMP] edi_purchase_oca: pre-commit auto fixes
john-herholz-dt d320bb7
[MIG] edi_purchase_oca: Migration to 17.0
john-herholz-dt 405144e
[IMP] edi_purchase_oca: pre-commit auto fixes
P-H-Phuc 399d0b8
[MIG] edi_purchase_oca: Migration to 18.0
P-H-Phuc 910cf93
[IMP] edi_purchase_oca: pre-commit auto fixes
AaronHForgeFlow 7ed9931
[MIG] edi_purchase_oca: Migration to 19.0
yankinmax 313284b
[REF] edi_purchase_oca: align with edi_sale_oca
yankinmax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| ============ | ||
| EDI Purchase | ||
| ============ | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:8ab40ab13f4a26ea0ba04ff19e53af88e490d1b2e783699454ae6255422e00c3 | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
| :target: https://odoo-community.org/page/development-status | ||
| :alt: Beta | ||
| .. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png | ||
| :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
| :alt: License: LGPL-3 | ||
| .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github | ||
| :target: https://github.com/OCA/edi-framework/tree/19.0/edi_purchase_oca | ||
| :alt: OCA/edi-framework | ||
| .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
| :target: https://translation.odoo-community.org/projects/edi-framework-19-0/edi-framework-19-0-edi_purchase_oca | ||
| :alt: Translate me on Weblate | ||
| .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
| :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=19.0 | ||
| :alt: Try me on Runboat | ||
|
|
||
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| Handle purchase orders via EDI. | ||
|
|
||
| This is a base module to plug purchase processes with the EDI framework. | ||
|
|
||
| To handle inbound/outbound purchase orders, you need to create your own | ||
| integration modules on top of this base module. | ||
|
|
||
| **Table of contents** | ||
|
|
||
| .. contents:: | ||
| :local: | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues <https://github.com/OCA/edi-framework/issues>`_. | ||
| In case of trouble, please check there if your issue has already been reported. | ||
| If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
| `feedback <https://github.com/OCA/edi-framework/issues/new?body=module:%20edi_purchase_oca%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
|
||
| Do not contact contributors directly about support or help with technical issues. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Authors | ||
| ------- | ||
|
|
||
| * ForgeFlow | ||
| * Camptocamp | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Lois Rilo lois.rilo@forgeflow.com | ||
| - Simone Orsi simone.orsi@camptocamp.com | ||
| - Phan Hong Phuc <phucph@trobz.com> | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
| This module is maintained by the OCA. | ||
|
|
||
| .. image:: https://odoo-community.org/logo.png | ||
| :alt: Odoo Community Association | ||
| :target: https://odoo-community.org | ||
|
|
||
| OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
| mission is to support the collaborative development of Odoo features and | ||
| promote its widespread use. | ||
|
|
||
| This module is part of the `OCA/edi-framework <https://github.com/OCA/edi-framework/tree/19.0/edi_purchase_oca>`_ project on GitHub. | ||
|
|
||
| You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com) | ||
| # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
|
||
| { | ||
| "name": "EDI Purchase", | ||
| "summary": """ | ||
| Define EDI Configuration for Purchase Orders""", | ||
| "version": "19.0.1.0.0", | ||
| "development_status": "Beta", | ||
| "license": "LGPL-3", | ||
| "author": "ForgeFlow, Camptocamp, Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/edi-framework", | ||
| "depends": [ | ||
| "purchase", | ||
| "edi_core_oca", | ||
| "edi_record_metadata_oca", | ||
| "edi_component_oca", | ||
| ], | ||
| "data": [ | ||
| # Data | ||
| "data/edi_configuration.xml", | ||
| # Views | ||
| "views/edi_exchange_record_views.xml", | ||
| "views/purchase_order_views.xml", | ||
| "views/res_partner_view.xml", | ||
| ], | ||
| "demo": [ | ||
| "demo/edi_backend.xml", | ||
| "demo/edi_exchange_type.xml", | ||
| "demo/edi_configuration.xml", | ||
| ], | ||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <!-- Generic state change --> | ||
| <record | ||
| id="edi_conf_trigger_purchase_order_state_change" | ||
| model="edi.configuration.trigger" | ||
| > | ||
| <field name="name">On PO state change</field> | ||
| <field name="code">on_edi_purchase_order_state_change</field> | ||
| <field name="description">Trigger when a purchase order state changes</field> | ||
| <field name="model_id" ref="purchase.model_purchase_order" /> | ||
| </record> | ||
| </odoo> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <odoo> | ||
| <record id="demo_edi_backend_type_purchase" model="edi.backend.type"> | ||
| <field name="name">Purchase DEMO</field> | ||
| <field name="code">purchase_demo</field> | ||
| </record> | ||
| <record id="demo_edi_backend" model="edi.backend"> | ||
| <field name="name">purchase DEMO</field> | ||
| <field name="backend_type_id" ref="demo_edi_backend_type_purchase" /> | ||
| </record> | ||
| </odoo> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record id="demo_edi_configuration_confirmed" model="edi.configuration"> | ||
| <field name="name">Demo Purchase Order - order confirmed</field> | ||
| <field | ||
| name="description" | ||
| >Show case how you can send out an order automatically</field> | ||
| <field name="type_id" ref="demo_edi_exc_type_order_out" /> | ||
| <field name="backend_id" ref="demo_edi_backend" /> | ||
| <field name="model_id" ref="purchase.model_purchase_order" /> | ||
| <field name="trigger_id" ref="edi_conf_trigger_purchase_order_state_change" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello @simahawk I thought you've pointed too use this in this suggestion: |
||
| <field name="snippet_do"> | ||
| # ('draft', 'RFQ'), | ||
| # ('sent', 'RFQ Sent'), | ||
| # ('to approve', 'To Approve'), | ||
| # ('purchase', 'Purchase Order'), | ||
| # ('cancel', 'Cancelled') | ||
| if record.state == 'purchase': | ||
| record._edi_send_via_edi(conf.type_id) | ||
| </field> | ||
| </record> | ||
| <record id="demo_edi_configuration_cancelled" model="edi.configuration"> | ||
| <field name="name">Demo Purchase Order - order cancelled</field> | ||
| <field | ||
| name="description" | ||
| >Show case how you can send out an order automatically</field> | ||
| <field name="type_id" ref="demo_edi_exc_type_order_out" /> | ||
| <field name="backend_id" ref="demo_edi_backend" /> | ||
| <field name="model_id" ref="purchase.model_purchase_order" /> | ||
| <field name="trigger_id" ref="edi_conf_trigger_purchase_order_state_change" /> | ||
| <field name="snippet_do"> | ||
| if record.state == 'cancel': | ||
| record._edi_send_via_edi(conf.type_id) | ||
| </field> | ||
| </record> | ||
| </odoo> | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record id="demo_edi_exc_type_order_out" model="edi.exchange.type"> | ||
| <field name="backend_type_id" ref="demo_edi_backend_type_purchase" /> | ||
| <field name="backend_id" ref="demo_edi_backend" /> | ||
| <field name="name">Demo Purchase Order out</field> | ||
| <field name="code">demo_PurchaseOrder_out</field> | ||
| <field name="direction">output</field> | ||
| <field name="exchange_filename_pattern">{record_name}-{type.code}-{dt}</field> | ||
| <field name="exchange_file_ext">xml</field> | ||
| </record> | ||
| </odoo> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * edi_purchase_oca | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 18.0\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "POT-Creation-Date: 2025-12-31 04:47+0000\n" | ||
| "PO-Revision-Date: 2025-12-31 04:47+0000\n" | ||
| "Last-Translator: \n" | ||
| "Language-Team: \n" | ||
| "MIME-Version: 1.0\n" | ||
| "Content-Type: text/plain; charset=UTF-8\n" | ||
| "Content-Transfer-Encoding: \n" | ||
| "Plural-Forms: \n" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form | ||
| msgid "<span class=\"o_stat_text\">EDI</span>" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model,name:edi_purchase_oca.model_res_partner | ||
| msgid "Contact" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form | ||
| msgid "Disable" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_disable_auto | ||
| msgid "Disable auto" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form | ||
| msgid "EDI" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_type_id | ||
| msgid "EDI origin exchange type" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_exchange_record_id | ||
| msgid "EDI origin record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_res_partner__edi_purchase_conf_ids | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_res_users__edi_purchase_conf_ids | ||
| msgid "EDI purchase configuration" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_exchange_record_id | ||
| msgid "EDI record that originated this document." | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config | ||
| msgid "Edi Config" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_has_form_config | ||
| msgid "Edi Has Form Config" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_purchase_oca.purchase_order_form | ||
| msgid "Electronic Data Interchange" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids | ||
| msgid "Exchange Record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count | ||
| msgid "Exchange Record Count" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_related_record_ids | ||
| msgid "Exchange Related Record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root | ||
| msgid "Exchange records" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_purchase_oca.view_partner_form | ||
| msgid "Purchase" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model,name:edi_purchase_oca.model_purchase_order | ||
| msgid "Purchase Order" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.actions.act_window,name:edi_purchase_oca.act_open_edi_exchange_record_purchase_order_view | ||
| msgid "Purchase Order Exchange Record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record | ||
| msgid "Purchase Orders" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_purchase_oca | ||
| #: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__edi_disable_auto | ||
| msgid "When marked, EDI automatic processing will be avoided" | ||
| msgstr "" |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are getting rid of listeners but adding
edi_component_ocahere? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this is the idea requested here:
#180 (comment)