Skip to content

Commit

Permalink
Merge PR #24 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed Dec 2, 2023
2 parents dae7fd1 + 357d3eb commit 293c0bc
Show file tree
Hide file tree
Showing 16 changed files with 788 additions and 0 deletions.
89 changes: 89 additions & 0 deletions edi_stock_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
=============
Edi Stock Oca
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:86f992c265563b0aba142fa991907c56f1a0a8a5dccd5df6166825a9bb165808
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/licence-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-lightgray.png?logo=github
:target: https://github.com/OCA/edi/tree/15.0/edi_stock_oca
:alt: OCA/edi
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/edi-15-0/edi-15-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&target_branch=15.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-block:: 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/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/issues/new?body=module:%20edi_stock_oca%0Aversion:%2015.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
~~~~~~~

* Odoo Community Association

Contributors
~~~~~~~~~~~~

* Alba Riera <alba.riera@creublanca.es>

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 <https://github.com/OCA/edi/tree/15.0/edi_stock_oca>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions edi_stock_oca/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions edi_stock_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2022 Odoo Community Association
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Edi Stock Oca",
"summary": """
Define EDI Configuration for Stock""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "Odoo Community Association,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/edi-framework",
"depends": ["stock", "edi_oca", "component_event"],
"data": ["views/stock_picking.xml", "views/res_partner.xml"],
"demo": [],
}
69 changes: 69 additions & 0 deletions edi_stock_oca/i18n/edi_stock_oca.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_stock_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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_terms:ir.ui.view,arch_db:edi_stock_oca.stock_picking_form_view
msgid "<span class=\"o_stat_text\">EDI</span>"
msgstr ""

#. module: edi_stock_oca
#: model_terms:ir.ui.view,arch_db:edi_stock_oca.stock_picking_form_view
msgid "Disable"
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_terms:ir.ui.view,arch_db:edi_stock_oca.view_partner_form
msgid "EDI Configuration"
msgstr ""

#. module: edi_stock_oca
#: model:ir.model.fields,field_description:edi_stock_oca.field_stock_picking__edi_auto_disabled
msgid "Edi Auto Disabled"
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,name:edi_stock_oca.model_stock_picking
msgid "Transfer"
msgstr ""
1 change: 1 addition & 0 deletions edi_stock_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_picking
36 changes: 36 additions & 0 deletions edi_stock_oca/models/stock_picking.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2022 OCA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models


class StockPicking(models.Model):
_name = "stock.picking"
_inherit = ["stock.picking", "edi.exchange.consumer.mixin"]

edi_disable_auto = fields.Boolean(
states={
"draft": [("readonly", False)],
"waiting": [("readonly", False)],
"confirmed": [("readonly", False)],
"assigned": [("readonly", False)],
},
)

def action_confirm(self):
result = super().action_confirm()
if self:
self._event("on_confirm_picking").notify(self)
return result

def _action_done(self):
result = super()._action_done()
if self:
self._event("on_validate_picking").notify(self)
return result

def action_cancel(self):
result = super().action_cancel()
if self:
self._event("on_cancel_picking").notify(self)
return result
1 change: 1 addition & 0 deletions edi_stock_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alba Riera <alba.riera@creublanca.es>
14 changes: 14 additions & 0 deletions edi_stock_oca/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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-block:: 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"""
Binary file added edi_stock_oca/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 293c0bc

Please sign in to comment.