Skip to content
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

[17.0] edi_purchase_oca: Migration to 17.0 #108

Open
wants to merge 14 commits into
base: 17.0
Choose a base branch
from
Open
89 changes: 89 additions & 0 deletions edi_purchase_oca/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
============
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/licence-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/17.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-17-0/edi-framework-17-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=17.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 purchase.

In order to add a new integration, you need to create a listener:

.. code:: python

class MyEventListener(Component):
_name = "purchase.order.event.listener.demo"
_inherit = "base.event.listener"
_apply_on = ["purchase.order"]

def on_button_confirm_purchase_order(self, move):
"""Add your code here"""

**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:%2017.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

Contributors
------------

- Lois Rilo <[email protected]>

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/17.0/edi_purchase_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_purchase_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_purchase_oca/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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": "17.0.1.0.0",
"license": "LGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/edi-framework",
"depends": ["purchase", "edi_oca", "component_event"],
"data": ["views/purchase_order_views.xml", "views/edi_exchange_record_views.xml"],
"demo": [],
}
109 changes: 109 additions & 0 deletions edi_purchase_oca/i18n/edi_purchase_oca.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_purchase_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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_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.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto
msgid "Disable auto"
msgstr ""

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name
msgid "Display Name"
msgstr ""

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
msgid "EDI origin endpoint"
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,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: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.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root
msgid "Exchange records"
msgstr ""

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id
msgid "ID"
msgstr ""

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update
msgid "Last Modified on"
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__origin_edi_endpoint_id
msgid "Record generated via this endpoint"
msgstr ""

#. module: edi_purchase_oca
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto
msgid "When marked, EDI automatic processing will be avoided"
msgstr ""
112 changes: 112 additions & 0 deletions edi_purchase_oca/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * edi_purchase_oca
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-25 11:34+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\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 "<span class=\"o_stat_text\">EDI</span>"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__disable_edi_auto
msgid "Disable auto"
msgstr "Deshabilitar auto"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__display_name
msgid "Display Name"
msgstr "Mostrar Nombre"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
msgid "EDI origin endpoint"
msgstr "Punto final de origen EDI"

#. 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 "Tipo de intercambio de origen EDI"

#. 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 "Registro de origen EDI"

#. 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 "Registro EDI que originó este documento."

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__edi_config
msgid "Edi Config"
msgstr "Configuración Edi"

#. 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 "Edi Tiene Formulario Config"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_ids
msgid "Exchange Record"
msgstr "Registro de Intercambio"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__exchange_record_count
msgid "Exchange Record Count"
msgstr "Recuento de Registros de Intercambio"

#. module: edi_purchase_oca
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_root
msgid "Exchange records"
msgstr "Registros de intercambio"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order__id
msgid "ID"
msgstr "ID"

#. module: edi_purchase_oca
#: model:ir.model.fields,field_description:edi_purchase_oca.field_purchase_order____last_update
msgid "Last Modified on"
msgstr "Última actualización el"

#. module: edi_purchase_oca
#: model:ir.model,name:edi_purchase_oca.model_purchase_order
msgid "Purchase Order"
msgstr "Orden de Compra"

#. 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 "Registro de Intercambio de Órdenes de Compra"

#. module: edi_purchase_oca
#: model:ir.ui.menu,name:edi_purchase_oca.menu_purchase_edi_exchange_record
msgid "Purchase Orders"
msgstr "Órdenes de Compra"

#. module: edi_purchase_oca
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__origin_edi_endpoint_id
msgid "Record generated via this endpoint"
msgstr "Registro generado a través de este punto final"

#. module: edi_purchase_oca
#: model:ir.model.fields,help:edi_purchase_oca.field_purchase_order__disable_edi_auto
msgid "When marked, EDI automatic processing will be avoided"
msgstr "Si se marca, se evitará el procesamiento automático EDI"
1 change: 1 addition & 0 deletions edi_purchase_oca/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import purchase_order
21 changes: 21 additions & 0 deletions edi_purchase_oca/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import models


class PurchaseOrder(models.Model):
_name = "purchase.order"
_inherit = ["purchase.order", "edi.exchange.consumer.mixin"]

def button_confirm(self):
result = super().button_confirm()

Check warning on line 12 in edi_purchase_oca/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

edi_purchase_oca/models/purchase_order.py#L12

Added line #L12 was not covered by tests
if self:
self._event("on_button_confirm_purchase_order").notify(self)
return result

Check warning on line 15 in edi_purchase_oca/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

edi_purchase_oca/models/purchase_order.py#L14-L15

Added lines #L14 - L15 were not covered by tests

def button_cancel(self):
result = super().button_cancel()

Check warning on line 18 in edi_purchase_oca/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

edi_purchase_oca/models/purchase_order.py#L18

Added line #L18 was not covered by tests
if self:
self._event("on_button_cancel_purchase_order").notify(self)
return result

Check warning on line 21 in edi_purchase_oca/models/purchase_order.py

View check run for this annotation

Codecov / codecov/patch

edi_purchase_oca/models/purchase_order.py#L20-L21

Added lines #L20 - L21 were not covered by tests
3 changes: 3 additions & 0 deletions edi_purchase_oca/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions edi_purchase_oca/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Lois Rilo \<<[email protected]>\>
14 changes: 14 additions & 0 deletions edi_purchase_oca/readme/DESCRIPTION.md
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 purchase.

In order to add a new integration, you need to create a listener:

``` python
class MyEventListener(Component):
_name = "purchase.order.event.listener.demo"
_inherit = "base.event.listener"
_apply_on = ["purchase.order"]

def on_button_confirm_purchase_order(self, move):
"""Add your code here"""
```
Binary file added edi_purchase_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
Loading