Skip to content

Commit

Permalink
[ADD] stock_warehouse_relationship: add warehouse id on various model
Browse files Browse the repository at this point in the history
useful for other modules such as stokc_multi_warehouse_security
  • Loading branch information
petrus-v authored and florian-dacosta committed Jan 29, 2024
1 parent b44a3a9 commit c73621f
Show file tree
Hide file tree
Showing 22 changed files with 1,198 additions and 0 deletions.
108 changes: 108 additions & 0 deletions stock_warehouse_relationship/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
============================
Stock Warehouse relationship
============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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%2Fstock--logistics--warehouse-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_warehouse_relationship
:alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_warehouse_relationship
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/153/14.0
:alt: Try me on Runbot

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

This module add relationship on various stock models to warehouses (`stock.warehouse`).

This is technical modules to be use as base for other modules such as:

* **stock_multi_warehouse_security**: Add ir rules to restrict user access to a list of warehouses

Following models are linked by this module:

* *stock.picking*
* *stock.move*
* *stock.move.line*
* *stock.quant*
* *stock.quant.package*

You'll probably like to use `stock_location_warehouse` as well
which add `warehouse_id` on `stock.location`.

This module is inspired from the experiences of
`stock_multi_warehouse_security <https://github.com/akretion/stock-logistics-warehouse/tree/12-muli-wh-security/stock_multi_warehouse_security/>`_
on version 12.0 but has some key differences on user experience:

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

* link inventories to warehouse(s) somehow

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

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

* Akretion
* Pierre Verkest

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

* `Foodles <https://www.foodles.co>`_

* Pierre Verkest <[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-petrus-v| image:: https://github.com/petrus-v.png?size=40px
:target: https://github.com/petrus-v
:alt: petrus-v

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

|maintainer-petrus-v|

This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_warehouse_relationship>`_ 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 stock_warehouse_relationship/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
25 changes: 25 additions & 0 deletions stock_warehouse_relationship/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (C) 2019 Akretion
# Copyright 2022 Foodles (http://www.foodles.co).
# @author Pierre Verkest <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Warehouse relationship",
"summary": "Technical module to add warehouse_id field on various stock.* models",
"version": "14.0.1.0.0",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "Akretion, Pierre Verkest, Odoo Community Association (OCA)",
"maintainers": ["petrus-v"],
"license": "AGPL-3",
"installable": True,
"depends": [
"stock",
],
"data": [
"views/stock_move_line.xml",
"views/stock_move.xml",
"views/stock_quant_package.xml",
"views/stock_quant.xml",
],
"development_status": "Alpha",
}
86 changes: 86 additions & 0 deletions stock_warehouse_relationship/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_relationship
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__display_name
msgid "Display Name"
msgstr "Nom affiché"

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__id
msgid "ID"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant_package
msgid "Packages"
msgstr "Colis"

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move_line
msgid "Product Moves (Stock Move Line)"
msgstr "Mouvements d'article (Ligne de mouvement de stock)"

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant
msgid "Quants"
msgstr "Quants"

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move
msgid "Stock Move"
msgstr "Mouvement de stock"

#. module: stock_warehouse_relationship
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move_line__warehouse_id
msgid ""
"Technical field depicting the warehouse to consider for the route selection "
"on the next procurement (if any)."
msgstr ""
"Champ technique décrivant l'entrepôt à prendre en compte pour le choix de la "
"route du prochain approvisionnement (s'il y en a un)."

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_picking
msgid "Transfer"
msgstr "Transfert"

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__warehouse_id
msgid "Warehouse"
msgstr "Entrepôt"
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_relationship
#
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: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__display_name
msgid "Display Name"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__id
msgid "ID"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package____last_update
msgid "Last Modified on"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant_package
msgid "Packages"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move_line
msgid "Product Moves (Stock Move Line)"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move_line__warehouse_id
msgid ""
"Technical field depicting the warehouse to consider for the route selection "
"on the next procurement (if any)."
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_picking
msgid "Transfer"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__warehouse_id
msgid "Warehouse"
msgstr ""
83 changes: 83 additions & 0 deletions stock_warehouse_relationship/i18n/stock_warehouse_relationship.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_relationship
#
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: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__display_name
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__display_name
msgid "Display Name"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__id
msgid "ID"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant____last_update
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package____last_update
msgid "Last Modified on"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant_package
msgid "Packages"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move_line
msgid "Product Moves (Stock Move Line)"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_quant
msgid "Quants"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,help:stock_warehouse_relationship.field_stock_move_line__warehouse_id
msgid ""
"Technical field depicting the warehouse to consider for the route selection "
"on the next procurement (if any)."
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model,name:stock_warehouse_relationship.model_stock_picking
msgid "Transfer"
msgstr ""

#. module: stock_warehouse_relationship
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_move_line__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_picking__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant__warehouse_id
#: model:ir.model.fields,field_description:stock_warehouse_relationship.field_stock_quant_package__warehouse_id
msgid "Warehouse"
msgstr ""
5 changes: 5 additions & 0 deletions stock_warehouse_relationship/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import stock_move
from . import stock_picking
from . import stock_quant
from . import stock_quant_package
from . import stock_move_line
Loading

0 comments on commit c73621f

Please sign in to comment.