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

[16.0] [MIG] stock_operating_unit #598

Merged
merged 54 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
73cf26a
stock_operating_unit
JordiBForgeFlow Sep 15, 2016
6c3cc95
flake8 issues
JordiBForgeFlow Sep 28, 2016
531b794
flake 8
JordiBForgeFlow Sep 28, 2016
2dfb17d
flake 8
JordiBForgeFlow Sep 28, 2016
75ce439
update contributors
AaronHForgeFlow Sep 30, 2016
6c1d613
code style
AaronHForgeFlow Oct 4, 2016
84f7972
constraint that checks the OU in the picking matches the one in the move
AaronHForgeFlow Oct 4, 2016
f559fc6
the operating unit in pickings should derive from the picking type
JordiBForgeFlow Oct 5, 2016
5f414e5
travis issues
AaronHForgeFlow Oct 5, 2016
02ea8dc
travis issues and test stock picking
AaronHForgeFlow Nov 4, 2016
ff9095e
test stock security according picking 1 in test_stock_picking
AaronHForgeFlow Nov 4, 2016
5cb7192
Update operating units of previous locations
AaronHForgeFlow Jan 16, 2017
375505c
lint check operating_unit_id readonly in the picking
AaronHForgeFlow Jan 17, 2017
3a736be
Correct error message and xml files
guewen Jan 23, 2017
4302910
[MIG] stock_operating_unit to v10.0
AaronHForgeFlow Jan 26, 2017
8247d16
[FIX] stock_operating_unit: correct constrain function, avoid error o…
esthermm Apr 5, 2017
e4e7a77
[FIX]onchange does not work with readonly fields
AaronHForgeFlow Sep 28, 2017
6345eb9
[FIX]stock.move._check_stock_move_operating_unit
AaronHForgeFlow Apr 10, 2018
a28290e
[FIX]internal locations should consider all locations but customer or…
AaronHForgeFlow Jun 7, 2018
b1826c0
[FIX]field that triggers constraint is not a valid field name
AaronHForgeFlow Jul 26, 2018
0e3de68
[MIG] stock_operating_unit: Migration to v12
bjeficent Dec 12, 2018
a2ea55e
[UPD] Update stock_operating_unit.pot
oca-travis Oct 16, 2019
b82297f
[UPD] README.rst
OCA-git-bot Oct 16, 2019
2cd2a25
[FIX] Alignments
MiquelRForgeFlow Nov 27, 2019
6aedbb0
[IMP] stock_operating_unit: black, isort, prettier
BT-nstuder Jan 6, 2020
c9bfe1a
[MIG] stock_operating_unit: Migration to 13.0
BT-nstuder Apr 2, 2020
d2148bf
[IMP] stock_operating_unit: Update record rule
BT-nstuder Apr 6, 2020
b131226
[FIX] stock_operating_unit: Constraint on stock move
BT-nstuder Apr 6, 2020
212c36f
[IMP]add operating unit rule in stock.move.line
AaronHForgeFlow Apr 20, 2020
16ceb12
[UPD] Update stock_operating_unit.pot
oca-travis Apr 20, 2020
68074ae
[UPD] README.rst
OCA-git-bot Apr 20, 2020
d870142
[UPD] Eficent -> ForgeFlow
MiquelRForgeFlow Oct 5, 2020
6c86b8b
[UPD] README.rst
OCA-git-bot Oct 5, 2020
02e6082
[14.0][MIG] stock_operating_unit
kittiu Dec 4, 2020
8f2f395
[IMP] Multi Ware Access
osi-scampbell Jan 15, 2020
5d555ce
[UPD] Update stock_operating_unit.pot
oca-travis May 9, 2021
367cf49
[UPD] README.rst
OCA-git-bot May 9, 2021
a5cb0c2
[FIX] stock_operating_unit: fix warning in orderpoint constraint oper…
alan196 Aug 17, 2021
460bf8a
stock_operating_unit 14.0.1.0.1
OCA-git-bot Aug 17, 2021
5bda357
[14.0] stock_operating_unit: Add Record Rule to Quants.
gdgellatly Jan 9, 2022
e682839
stock_operating_unit 14.0.1.0.2
OCA-git-bot Jan 11, 2022
79d62ca
[IMP] stock_operating_unit: black, isort, prettier
alan196 Mar 29, 2022
37f9210
[MIG] stock_operating_unit: Migration to 15.0
alan196 Mar 29, 2022
b28d27f
[UPD] Update stock_operating_unit.pot
Jul 15, 2022
4744f42
[UPD] README.rst
OCA-git-bot Jul 15, 2022
619e2d7
Added translation using Weblate (Spanish (Argentina))
ibuioli Aug 6, 2022
5efa5b7
Translated using Weblate (Spanish (Argentina))
ibuioli Aug 6, 2022
a796986
[FIX] stock_operating_unit: filter domain users out
Saran440 Mar 3, 2023
5840114
stock_operating_unit 15.0.1.1.0
OCA-git-bot Mar 7, 2023
b33f711
[FIX] stock_operating_unit: remove domain of operation type
ps-tubtim Mar 9, 2023
66496f4
stock_operating_unit 15.0.1.2.0
OCA-git-bot Mar 10, 2023
bf53c22
[FIX] stock_operating_unit: migration script to 15.0
AaronHForgeFlow May 23, 2023
628a011
[IMP] stock_operating_unit: pre-commit stuff
Borruso Jun 22, 2023
ada2746
[MIG] stock_operating_unit: Migration to 16.0
Borruso Jun 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions setup/stock_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,
)
105 changes: 105 additions & 0 deletions stock_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
==========================
Stock with Operating Units
==========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-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/16.0/stock_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-16-0/operating-unit-16-0-stock_operating_unit
: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/operating-unit&target_branch=16.0
:alt: Try me on Runboat

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

This module introduces the following features:

- Adds the operating unit to the Warehouse.
- Adds the operating unit to the Stock Location.
- Adds the requesting operating unit to stock pickings.
- Implements user's security access rules.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

* Assign Operating Unit to Warehouses.
* Assign Operating Unit to Stock Locations.

Usage
=====

This module defines the operating unit entity and the user's security rules.
Other modules extend the standard Odoo apps with the OU.

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

The Manager can see the stock rules of other Operating Units but he can not
edit them. If he tries to access to one of these stock rules, he will receive
a configuration error.

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_operating_unit%0Aversion:%2016.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
* Serpent Consulting Services Pvt. Ltd.

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

* Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
* Aaron Henriquez <ahforgeflow@forgeflow.com>
* Sudhir Arya <sudhir.arya@serpentcs.com>
* Nicola Studer <nicola.studer@braintec-group.com>
* Kitti U. <kittiu@ecosoft.co.th>
* Alan Ramos <alan.ramos@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.

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

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

from . import model
19 changes: 19 additions & 0 deletions stock_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2019 ForgeFlow S.L.
# Copyright 2019 Serpent Consulting Services Pvt. Ltd.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

{
"name": "Stock with Operating Units",
"summary": "Adds the concept of operating unit (OU) in stock management",
"version": "16.0.1.0.0",
"category": "Generic Modules/Sales & Purchases",
"author": "ForgeFlow, "
"Serpent Consulting Services Pvt. Ltd., "
"Odoo Community Association (OCA)",
"license": "LGPL-3",
"website": "https://github.com/OCA/operating-unit",
"depends": ["stock", "operating_unit"],
"data": ["security/stock_security.xml", "data/stock_data.xml", "view/stock.xml"],
"demo": ["demo/stock_demo.xml"],
"installable": True,
}
12 changes: 12 additions & 0 deletions stock_operating_unit/data/stock_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ForgeFlow S.L.
Copyright 2019 Serpent Consulting Services Pvt. Ltd.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo noupdate="1">
<record id="stock.warehouse0" model="stock.warehouse">
<field name="operating_unit_id" ref="operating_unit.main_operating_unit" />
</record>
<record id="stock.stock_location_stock" model="stock.location">
<field name="operating_unit_id" ref="operating_unit.main_operating_unit" />
</record>
</odoo>
49 changes: 49 additions & 0 deletions stock_operating_unit/demo/stock_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2019 ForgeFlow S.L.
Copyright 2019 Serpent Consulting Services Pvt. Ltd.
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
<odoo noupdate="1">
<!-- Shelf 2 stock location -->
<record id="stock.stock_location_14" model="stock.location">
<field name="operating_unit_id" ref="operating_unit.main_operating_unit" />
</record>
<!-- Shelf 1 stock location -->
<record id="stock.stock_location_components" model="stock.location">
<field name="operating_unit_id" ref="operating_unit.main_operating_unit" />
</record>
<!-- Multi Company -->
<!-- Child Company 1-->
<record id="stock.res_company_1" model="res.company">
<field name="name">Your company child</field>
</record>
<record id="operating_unit_shop0" model="operating.unit">
<field name="name">Chicago</field>
<field name="code">CH</field>
<field name="partner_id" ref="stock.res_partner_company_1" />
<field name="company_id" ref="stock.res_company_1" />
</record>
<!-- Chicago Warehouse -->
<record id="stock.stock_warehouse_shop0" model="stock.warehouse">
<field name="operating_unit_id" ref="operating_unit_shop0" />
</record>
<!-- Your Company, Chicago shop -->
<record id="stock.stock_location_shop0" model="stock.location">
<field name="operating_unit_id" ref="operating_unit_shop0" />
</record>
<!--B2B-->
<record id="stock_warehouse_b2b" model="stock.warehouse">
<field name="name">B2B Warehouse</field>
<field name="code">B2B</field>
<field name="partner_id" ref="base.main_partner" />
<field name="company_id" ref="base.main_company" />
<field name="operating_unit_id" ref="operating_unit.b2b_operating_unit" />
</record>
<!-- B2C -->
<record id="stock_warehouse_b2c" model="stock.warehouse">
<field name="name">B2C Warehouse</field>
<field name="code">B2C</field>
<field name="partner_id" ref="base.main_partner" />
<field name="company_id" ref="base.main_company" />
<field name="operating_unit_id" ref="operating_unit.b2c_operating_unit" />
</record>
</odoo>
168 changes: 168 additions & 0 deletions stock_operating_unit/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-08-06 20:07+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\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.3.2\n"

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_warehouse.py:0
#, python-format
msgid ""
"Configuration Error. The Operating Unit of the Warehouse and the Location "
"must be the same. "
msgstr ""
"Error de Configuración. La Unidad Operativa del Almacén y la Ubicación debe "
"ser la misma. "

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_location.py:0
#, python-format
msgid ""
"Configuration error. The Company in the Stock Location and in the Operating "
"Unit must be the same."
msgstr ""
"Error de Configuración. La Compañía en la Ubicación de Inventario y en la "
"Unidad Operativa debe ser la misma."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_picking.py:0
#, python-format
msgid ""
"Configuration error. The Company in the Stock Picking and in the Operating "
"Unit must be the same."
msgstr ""
"Error de Configuración. La Compañía en la Transferencia de Inventario y en "
"la Unidad Operativa debe ser la misma."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_warehouse.py:0
#, python-format
msgid ""
"Configuration error. The Company in the Stock Warehouse and in the Operating"
" Unit must be the same."
msgstr ""
"Error de Configuración. La Compañía en el Almacén de Inventario y en la "
"Unidad Operativa debe ser la misma."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_picking.py:0
#, python-format
msgid ""
"Configuration error. The Operating Unit of the picking must be the same as "
"that of the warehouse of the Picking Type."
msgstr ""
"Error de Configuración. La Unidad Operativa de la transferencia debe ser la "
"misma que la del almacén del Tipo de Transferencia."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_location.py:0
#, python-format
msgid ""
"Configuration error. The Parent Stock Location must belong to the same "
"Operating Unit."
msgstr ""
"Error de Configuración. La Ubicación de Inventario principal debe pertenecer "
"a la misma Unidad Operativa."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_move.py:0
#, python-format
msgid ""
"Configuration error. The Stock moves must be related to a location (source "
"or destination) that belongs to the requesting Operating Unit."
msgstr ""
"Error de Configuración. Los Movimientos de Inventario debe estar "
"relacionados a una ubicación (origen o destino) que pertenezca a la Unidad "
"Operativa solicitada."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_location.py:0
#: code:addons/stock_operating_unit/model/stock_location.py:0
#, python-format
msgid ""
"Configuration error. The operating unit should be assigned to internal "
"locations only."
msgstr ""
"Error de Configuración. La unidad operativa debe ser asignada solo a "
"ubicaciones internas."

#. module: stock_operating_unit
#: code:addons/stock_operating_unit/model/stock_location.py:0
#, python-format
msgid ""
"Configuration error. This location is assigned to a warehouse that belongs "
"to a different operating unit."
msgstr ""
"Error de Configuración. Esta ubicación es asignada al almacén que pertenece "
"a una unidad operativa diferente."

#. module: stock_operating_unit
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_move__operating_unit_dest_id
msgid "Dest. Location Operating Unit"
msgstr "Ubicación de Destino de la Unidad Operativa"

#. module: stock_operating_unit
#: model:ir.model,name:stock_operating_unit.model_stock_location
msgid "Inventory Locations"
msgstr "Ubicaciones de Inventario"

#. module: stock_operating_unit
#: model:ir.model,name:stock_operating_unit.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Regla de Inventario Mínimo"

#. module: stock_operating_unit
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_location__operating_unit_id
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_quant__operating_unit_id
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_rule__operating_unit_id
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_warehouse__operating_unit_id
#: model_terms:ir.ui.view,arch_db:stock_operating_unit.view_picking_internal_search
msgid "Operating Unit"
msgstr "Unidad Operativa"

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

#. module: stock_operating_unit
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_picking__operating_unit_id
msgid "Requesting Operating Unit"
msgstr "Unidad Operativa Solicitante"

#. module: stock_operating_unit
#: model:ir.model.fields,field_description:stock_operating_unit.field_stock_move__operating_unit_id
msgid "Source Location Operating Unit"
msgstr "Ubicación de Origen de la Unidad Operativa"

#. module: stock_operating_unit
#: model:ir.model,name:stock_operating_unit.model_stock_move
msgid "Stock Move"
msgstr "Movimiento de Inventario"

#. module: stock_operating_unit
#: model:ir.model,name:stock_operating_unit.model_stock_rule
msgid "Stock Rule"
msgstr "Regla de Inventario"

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

#. module: stock_operating_unit
#: model:ir.model,name:stock_operating_unit.model_stock_warehouse
msgid "Warehouse"
msgstr "Almacén"
Loading