Skip to content

Commit

Permalink
[ADD] stock_location_route_operating_unit: new module to filter route…
Browse files Browse the repository at this point in the history
…s by operating unit
  • Loading branch information
alan196 committed Mar 11, 2023
1 parent c3561ba commit da3b197
Show file tree
Hide file tree
Showing 18 changed files with 782 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/stock_location_route_operating_unit/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,
)
102 changes: 102 additions & 0 deletions stock_location_route_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
===================================
Stock Location Route Operating Unit
===================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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%2Foperating--unit-lightgray.png?logo=github
:target: https://github.com/OCA/operating-unit/tree/15.0/stock_location_route_operating_unit
:alt: OCA/operating-unit
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/operating-unit-15-0/operating-unit-15-0-stock_location_route_operating_unit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/213/15.0
:alt: Try me on Runbot

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


This module extends the functionality of sale order lines to show only
the routes allowed for the operating unit of the sale order.

**Table of contents**

.. contents::
:local:

Configuration
=============


To configure this module, you need to:

#. Go to Inventory/Configuration/Routes
#. Select a route.
#. Define the operating units to be shown in sale lines.

Usage
=====


To use this module, you need to:

#. Go to configure routes to be shown in the sale line and select the operating units that you want to be available in the sale order lines.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/operating-unit/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/operating-unit/issues/new?body=module:%20stock_location_route_operating_unit%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
~~~~~~~

* Jarsa

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

* Alan Ramos <[email protected]>
* Jarsa (`Jarsa <https://www.jarsa.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.

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

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

|maintainer-alan196|

This module is part of the `OCA/operating-unit <https://github.com/OCA/operating-unit/tree/15.0/stock_location_route_operating_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions stock_location_route_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2023 Jarsa
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)

from . import models
23 changes: 23 additions & 0 deletions stock_location_route_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2023 Jarsa
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)

{
"name": "Stock Location Route Operating Unit",
"summary": "Manage Operating Unit in Stock Routes",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "Inventory/Inventory",
"website": "https://github.com/OCA/operating-unit",
"author": "Jarsa, Odoo Community Association (OCA)",
"maintainers": ["alan196"],
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": [
"sale_stock_operating_unit",
],
"data": [
"views/stock_location_route_view.xml",
"views/sale_order_view.xml",
],
}
34 changes: 34 additions & 0 deletions stock_location_route_operating_unit/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_location_route_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-11 17:53+0000\n"
"PO-Revision-Date: 2023-03-11 11:53-0600\n"
"Last-Translator: Jesús Alan Ramos Rodríguez <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.2.2\n"

#. module: stock_location_route_operating_unit
#: model:ir.model,name:stock_location_route_operating_unit.model_stock_location_route
msgid "Inventory Routes"
msgstr "Rutas de inventario"

#. module: stock_location_route_operating_unit
#: model:ir.model.fields,field_description:stock_location_route_operating_unit.field_stock_location_route__operating_unit_ids
#: model_terms:ir.ui.view,arch_db:stock_location_route_operating_unit.stock_location_route_view_form
msgid "Operating Units"
msgstr "Unidades operativas"

#. module: stock_location_route_operating_unit
#: model:ir.model,name:stock_location_route_operating_unit.model_sale_order_line
msgid "Sales Order Line"
msgstr "Línea de la orden de venta"
4 changes: 4 additions & 0 deletions stock_location_route_operating_unit/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2023 Jarsa
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)

from . import stock_location_route
13 changes: 13 additions & 0 deletions stock_location_route_operating_unit/models/stock_location_route.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2023 Jarsa
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)

from odoo import fields, models


class StockLocationRoute(models.Model):
_inherit = "stock.location.route"

operating_unit_ids = fields.Many2many(
comodel_name="operating.unit",
string="Operating Units",
)
6 changes: 6 additions & 0 deletions stock_location_route_operating_unit/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

To configure this module, you need to:

#. Go to Inventory/Configuration/Routes
#. Select a route.
#. Define the operating units to be shown in sale lines.
2 changes: 2 additions & 0 deletions stock_location_route_operating_unit/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Alan Ramos <[email protected]>
* Jarsa (`Jarsa <https://www.jarsa.com/>`__)
3 changes: 3 additions & 0 deletions stock_location_route_operating_unit/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

This module extends the functionality of sale order lines to show only
the routes allowed for the operating unit of the sale order.
4 changes: 4 additions & 0 deletions stock_location_route_operating_unit/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

To use this module, you need to:

#. Go to configure routes to be shown in the sale line and select the operating units that you want to be available in the sale order lines.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions stock_location_route_operating_unit/static/description/icon.svg
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 da3b197

Please sign in to comment.