Skip to content

Commit

Permalink
[ADD] shopfloor_purchase_base: Adds purchase order information to pic…
Browse files Browse the repository at this point in the history
…kings
  • Loading branch information
mt-software-de committed Jul 25, 2023
1 parent 70cd014 commit 39fc65c
Show file tree
Hide file tree
Showing 14 changed files with 601 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/shopfloor_purchase_base/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
81 changes: 81 additions & 0 deletions shopfloor_purchase_base/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
=======================
Shopfloor Purchase Base
=======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fwms-lightgray.png?logo=github
:target: https://github.com/OCA/wms/tree/14.0/shopfloor_purchase_base
:alt: OCA/wms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_purchase_base
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/wms&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This is a glue module between `shopfloor` and `l10n_eu_product_adr`

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/wms/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/wms/issues/new?body=module:%20shopfloor_purchase_base%0Aversion:%2014.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
~~~~~~~

* MT Software

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

* Matthieu Méquignon <[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.

.. |maintainer-mt-software-de| image:: https://github.com/mt-software-de.png?size=40px
:target: https://github.com/mt-software-de
:alt: mt-software-de

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-mt-software-de|

This module is part of the `OCA/wms <https://github.com/OCA/wms/tree/14.0/shopfloor_purchase_base>`_ 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 shopfloor_purchase_base/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import actions
17 changes: 17 additions & 0 deletions shopfloor_purchase_base/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2023 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Shopfloor Purchase Base",
"summary": "Module for Shopfloor Purchase Data connection",
"version": "14.0.1.0.0",
"category": "Inventory",
"website": "https://github.com/OCA/wms",
"author": "MT Software, Odoo Community Association (OCA)",
"maintainers": ["mt-software-de"],
"license": "AGPL-3",
"depends": [
"shopfloor",
"purchase",
],
"data": [],
}
2 changes: 2 additions & 0 deletions shopfloor_purchase_base/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import data
from . import schema
27 changes: 27 additions & 0 deletions shopfloor_purchase_base/actions/data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2023 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.addons.component.core import Component
from odoo.addons.shopfloor_base.utils import ensure_model


class DataAction(Component):
_inherit = "shopfloor.data.action"

@property
def _purchase_order_parser(self):
return [
"id",
"name",
"partner_ref",
]

@ensure_model("purchase.order")
def purchase_order(self, record, **kw):
parser = self._purchase_order_parser
return self._jsonify(record, parser, **kw)

@property
def _picking_parser(self, **kw):
res = super()._picking_parser
res.append(("purchase_id:purchase_order", self._purchase_order_parser))
return res
19 changes: 19 additions & 0 deletions shopfloor_purchase_base/actions/schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 Michael Tietz (MT Software) <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.addons.component.core import Component


class ShopfloorSchemaAction(Component):
_inherit = "shopfloor.schema.action"

def purchase_order(self):
return {
"id": {"required": True, "type": "integer"},
"name": {"type": "string", "nullable": False, "required": True},
"partner_ref": {"type": "string", "nullable": True, "required": False},
}

def picking(self, **kw):
res = super().picking()
res.update({"purchase_order": self._schema_dict_of(self.purchase_order())})
return res
1 change: 1 addition & 0 deletions shopfloor_purchase_base/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Matthieu Méquignon <[email protected]>
1 change: 1 addition & 0 deletions shopfloor_purchase_base/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is a glue module between `shopfloor` and `l10n_eu_product_adr`
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 39fc65c

Please sign in to comment.