-
-
Notifications
You must be signed in to change notification settings - Fork 56
[19.0][MIG] edi_stock_oca: Migration to 19.0 #255
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
sergijPf
wants to merge
32
commits into
OCA:19.0
Choose a base branch
from
DeineTuer-GmbH:19.0-mig-edi_stock_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
32 commits
Select commit
Hold shift + click to select a range
c3ab0e7
[ADD] edi_stock_oca
albariera 49d6636
[IMP] edi_account: change name field disable_edi_auto to edi_auto_dis…
albariera f4e7fc2
edi_stock_oca 13.0.1.0.1
OCA-git-bot fc8425d
[MIG] edi_stock_oca: Migration to 14.0
albariera 108ded3
[MIG] edi_stock_oca: Migration to 15.0
MiquelRForgeFlow f5fac9c
[IMP] edi_stock_oca: pre-commit stuff
OriolMForgeFlow 3ac360d
[MIG] edi_stock_oca: Migration to 16.0
OriolMForgeFlow 8c11594
[UPD] Update edi_stock_oca.pot
9212f97
[BOT] post-merge updates
OCA-git-bot cb66624
[IMP] edi_oca: add partner form page
c6194a0
[BOT] post-merge updates
OCA-git-bot 15c55df
[UPD] Update edi_stock_oca.pot
050db3a
[FIX] edi_stock_oca: fixing missing string field information from the…
678760e
[BOT] post-merge updates
OCA-git-bot 7672e1d
Added translation using Weblate (Italian)
mymage a58c16a
Translated using Weblate (Italian)
mymage 59aab00
Translated using Weblate (Italian)
mymage 9351130
[IMP] edi_stock_oca: pre-commit auto fixes
AlexPForgeFlow 5fa4968
[MIG] edi_stock_oca: Migration to 17.0
AlexPForgeFlow 991c496
[IMP] edi_stock_oca: pre-commit auto fixes
AlexPForgeFlow c9b2bed
[MIG] edi_stock_oca: Migration to 18.0
AlexPForgeFlow 2df651c
edi_stock: fix state trigger
simahawk 393b703
edi_stock: update authorship and copyright
simahawk 6271320
edi_stock: fix conf field label
simahawk 10c4df5
[UPD] Update edi_stock_oca.pot
696be6d
[BOT] post-merge updates
OCA-git-bot 5048720
[UPD] Update edi_stock_oca.pot
bbc9b4e
Update translation files
weblate ac91884
Translated using Weblate (Italian)
mymage 5d856ec
[IMP] edi_stock_oca: Adapt to new edi_core_oca logic
etobella 927e579
[BOT] post-merge updates
OCA-git-bot 81fcd79
[MIG] edi_stock_oca: Migration to 19.0
sergijPf 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
Some comments aren't visible on the classic Files Changed page.
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,96 @@ | ||
| .. image:: https://odoo-community.org/readme-banner-image | ||
| :target: https://odoo-community.org/get-involved?utm_source=readme | ||
| :alt: Odoo Community Association | ||
|
|
||
| ============= | ||
| EDI Stock OCA | ||
| ============= | ||
|
|
||
| .. | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! This file is generated by oca-gen-addon-readme !! | ||
| !! changes will be overwritten. !! | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| !! source digest: sha256:2bfa1cb755a6f8e89e8c22b36e0b803a587a8607be92c3de5eb8b11e9371faec | ||
| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
|
||
| .. |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-AGPL--3-blue.png | ||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-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_stock_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_stock_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| | ||
|
|
||
| This module intends to create a base to be extended by local edi rules | ||
| for stock. | ||
|
|
||
| In order to add a new integration for an stock picking, you need to | ||
| create a listener: | ||
|
|
||
| .. code:: python | ||
|
|
||
| class MyEventListener(Component): | ||
| _name = "stock.picking.event.listener.demo" | ||
| _inherit = "base.event.listener" | ||
| _apply_on = ["stock.picking"] | ||
|
|
||
| def on_validate(self, picking): | ||
| """Add your code here about creation of record""" | ||
|
|
||
| **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_stock_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 | ||
| ------- | ||
|
|
||
| * Creu Blanca | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| - Alba Riera <alba.riera@creublanca.es> | ||
| - Alex Paris <alex.paris@forgeflow.com> | ||
| - Simone Orsi <simone.orsi@camptopcamp.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_stock_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,2 @@ | ||
| from . import models | ||
| from . import components |
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,23 @@ | ||
| # Copyright 2022 Creu Blanca | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
|
||
| { | ||
| "name": "EDI Stock OCA", | ||
| "summary": """ | ||
| Define EDI Configuration for Stock""", | ||
| "version": "19.0.1.0.0", | ||
| "license": "AGPL-3", | ||
| "author": "Creu Blanca, Odoo Community Association (OCA)", | ||
| "website": "https://github.com/OCA/edi-framework", | ||
| "depends": ["stock", "edi_core_oca", "edi_component_oca"], | ||
| "data": [ | ||
| "data/edi_configuration.xml", | ||
| "views/stock_picking.xml", | ||
| "views/res_partner.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 @@ | ||
| from . import listeners |
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,24 @@ | ||
| from odoo.addons.component.core import Component | ||
|
|
||
|
|
||
| class EDIConfigSPListener(Component): | ||
| _name = "edi.listener.config.stock.picking" | ||
| _inherit = "base.event.listener" | ||
| _apply_on = ["stock.picking"] | ||
|
|
||
| def on_record_create(self, record, fields=None): | ||
| trigger = "on_record_create" | ||
| return self._exec_conf(record, trigger) | ||
|
|
||
| def on_record_write(self, record, fields=None): | ||
| trigger = "on_record_write" | ||
| return self._exec_conf(record, trigger) | ||
|
|
||
| def on_edi_stock_picking_state_change(self, record, state=None): | ||
| trigger = "on_edi_stock_picking_state_change" | ||
| return self._exec_conf(record, trigger) | ||
|
|
||
| def _exec_conf(self, record, trigger, conf_field="edi_stock_picking_conf_ids"): | ||
| confs = record.partner_id[conf_field].edi_get_conf(trigger) | ||
| for conf in confs: | ||
| conf.edi_exec_snippet_do(record) | ||
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_stock_picking_state_change" | ||
| model="edi.configuration.trigger" | ||
| > | ||
| <field name="name">On Transfer state change</field> | ||
| <field name="code">on_edi_stock_picking_state_change</field> | ||
| <field name="description">Trigger when a stock picking state changes</field> | ||
| <field name="model_id" ref="stock.model_stock_picking" /> | ||
| </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_stock_picking" model="edi.backend.type"> | ||
| <field name="name">TRANSFER DEMO</field> | ||
| <field name="code">picking_demo</field> | ||
| </record> | ||
| <record id="demo_edi_backend" model="edi.backend"> | ||
| <field name="name">TRANSFER DEMO</field> | ||
| <field name="backend_type_id" ref="demo_edi_backend_type_stock_picking" /> | ||
| </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,21 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <odoo> | ||
| <record id="demo_edi_configuration_done" model="edi.configuration"> | ||
| <field name="name">Demo Transfer - Done</field> | ||
| <field name="description">Show case state change to done</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="stock.model_stock_picking" /> | ||
| <field name="trigger_id" ref="edi_conf_trigger_stock_picking_state_change" /> | ||
| <field name="snippet_do"> | ||
| # ('draft', 'Draft'), | ||
| # ('waiting', 'Waiting Another Operation'), | ||
| # ('confirmed', 'Waiting'), | ||
| # ('assigned', 'Ready'), | ||
| # ('done', 'Done'), | ||
| # ('cancel', 'Cancelled'), | ||
| if record.state in ('done', 'cancel', 'confirmed', 'assigned'): | ||
| 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_stock_picking" /> | ||
| <field name="backend_id" ref="demo_edi_backend" /> | ||
| <field name="name">Demo Transfer Response</field> | ||
| <field name="code">demo_Transfer_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,105 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * edi_stock_oca | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 18.0\n" | ||
| "Report-Msgid-Bugs-To: \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_stock_oca | ||
| #: model:ir.model,name:edi_stock_oca.model_res_partner | ||
| msgid "Contact" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__edi_disable_auto | ||
| msgid "Disable auto" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_stock_oca.stock_picking_form_view | ||
| msgid "EDI" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__origin_edi_endpoint_id | ||
| msgid "EDI origin endpoint" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__origin_exchange_type_id | ||
| msgid "EDI origin exchange type" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__origin_exchange_record_id | ||
| msgid "EDI origin record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,help:edi_stock_oca.field_stock_picking__origin_exchange_record_id | ||
| msgid "EDI record that originated this document." | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_res_partner__edi_stock_picking_conf_ids | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_res_users__edi_stock_picking_conf_ids | ||
| msgid "EDI stock configuration" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__edi_config | ||
| msgid "Edi Config" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__edi_has_form_config | ||
| msgid "Edi Has Form Config" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_stock_oca.stock_picking_form_view | ||
| msgid "Electronic Data Interchange" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__exchange_record_ids | ||
| msgid "Exchange Record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__exchange_record_count | ||
| msgid "Exchange Record Count" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__exchange_related_record_ids | ||
| msgid "Exchange Related Record" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,help:edi_stock_oca.field_stock_picking__origin_edi_endpoint_id | ||
| msgid "Record generated via this endpoint" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model,name:edi_stock_oca.model_stock_picking | ||
| msgid "Transfer" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model_terms:ir.ui.view,arch_db:edi_stock_oca.view_partner_form | ||
| msgid "Transfers" | ||
| msgstr "" | ||
|
|
||
| #. module: edi_stock_oca | ||
| #: model:ir.model.fields,help:edi_stock_oca.field_stock_picking__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.
Not a blocker but we can now get rid of listeners and rely only on edi.conf records.
Shall we take the occasion?