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

[13.0][MIG] stock_no_negative #597

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0a9cea2
[MIG] stock_no_negative: Migration to 10.0
alexis-via Nov 17, 2016
efcb6a2
[ADD] test cases
serpentcs-dev1 Jan 5, 2017
b4e3898
[IMP] stock_no_negative: Behave correctly on other tests
MiquelRForgeFlow Aug 30, 2017
94143e7
[MIG] stock_no_negative: Migration to 11.0
etobella Dec 19, 2017
86892dc
minor fixes
rgarnau Dec 20, 2017
370db20
OCA Transbot updated translations from Transifex
oca-transbot Dec 30, 2017
16d9265
[FIX] Issue #391
etobella Dec 27, 2017
d94b56e
[FIX] stock_no_negative: Incorrect tests
pedrobaeza Feb 28, 2018
3614c5f
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
35dd57c
[UPD] Update stock_no_negative.pot
oca-travis Jun 23, 2018
638fba9
Added translation using Weblate (Arabic)
osoul Jun 29, 2018
a3d618a
Translated using Weblate (Arabic)
osoul Jun 29, 2018
942cd35
[IMP] stock_no_negative: Avoid problems on integration tests
pedrobaeza Oct 10, 2018
8e3ab3a
[stock_no_negative][IMP] Add the ability to allow negative stock for …
JordiBForgeFlow Dec 13, 2018
26eb839
[UPD] README.rst
OCA-git-bot Jan 24, 2019
6f83151
[UPD] Update stock_no_negative.pot
oca-travis Jan 24, 2019
d56b393
Update translation files
oca-transbot Jan 24, 2019
d5bf1c8
fix in incorrect view
JordiBForgeFlow Jan 28, 2019
4b3f6d6
[MIG] stock_no_negative: Migration to 12.0
meigallodixital Feb 27, 2019
6252626
[UPD] Update stock_no_negative.pot
oca-travis Feb 27, 2019
610f1f3
Update translation files
oca-transbot Mar 3, 2019
688ac24
[ADD] icon.png
OCA-git-bot Apr 3, 2019
83dc2c1
[UPD] README.rst
OCA-git-bot Jul 29, 2019
4c40996
[IMP] stock_no_negative: black, isort
qdelcourte Dec 19, 2019
702f9fa
[MIG] stock_no_negative: Migration to 13.0
qdelcourte Dec 19, 2019
cb213ab
[UPD] CONTRIBUTORS.rst and HISTORY.rst
qdelcourte Jan 3, 2020
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
134 changes: 134 additions & 0 deletions stock_no_negative/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
=======================
Stock Disallow Negative
=======================

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

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

By default, Odoo allows negative stock. The advantage of negative stock
is that, if some stock levels are wrong in the ERP, you will not be blocked
when validating the picking for a customer... so you will still be able to
ship the products on time (it's an example !). The problem is that, after you
forced the stock level to negative, you are supposed to fix the stock level
later via an inventory ; but this action is often forgotten by users,
so you end up with negative stock levels in your ERP and it can stay like
this forever (or at least until the next full inventory).

If you disallow negative stock in Odoo with this module, you will be blocked
when trying to validate a stock operation that will set the stock level of
a product and/or location as negative. So you will have to fix the
wrong stock level of that product without delay, in order to validate the
stock operation in Odoo...you can't forget it anymore !


**Table of contents**

.. contents::
:local:

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

By default, the stockable products will not be allowed to have a negative
stock. If you want to make some exceptions for some products, product
categories or locations, you can activate the option *Allow Negative Stock*:

For products:

#. Go to *Inventory / Master Data / Products* and in the
tab *General Information* activate this option.

For product categories:

#. Go to *Inventory / Configuration / Products / Product Categories*
and activate this option.

For individual locations:

#. Go to *Inventory / Configuration / Settings* and activate
the option *Storage Locations*.
#. Go to *Inventory / Configuration / Warehouse Management / Locations* and
activate the option the option *Allow Negative Stock* for the locations you
choose.


Usage
=====

When you validate a stock operation (a stock move, a picking,
a manufacturing order, etc.) that will set the stock level of a
stockable product as negative, you will be blocked by an error message.
The consumable products can still have a negative stock level.

Changelog
=========

11.0.1.1.0 (2018-12-13)
~~~~~~~~~~~~~~~~~~~~~~~

* Add the ability to allow negative stock for individual stock locations.

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

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

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

* Alexis de Lattre <[email protected]>
* Eficent Business and IT Consulting Services S.L. <[email protected]>
* Jordi Ballester
* Serpent Consulting Services Pvt. Ltd. <[email protected]>
* Tecnativa <https://www.tecnativa.com>
* Pedro M. Baeza

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/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/13.0/stock_no_negative>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions stock_no_negative/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ?? 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
17 changes: 17 additions & 0 deletions stock_no_negative/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ?? 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


{
"name": "Stock Disallow Negative",
"version": "13.0.1.0.0",
"category": "Inventory, Logistic, Storage",
"license": "AGPL-3",
"summary": "Disallow negative stock levels by default",
"author": "Akretion,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-workflow",
"depends": ["stock"],
"data": ["views/product_product_views.xml", "views/stock_location_views.xml"],
"installable": True,
}
97 changes: 97 additions & 0 deletions stock_no_negative/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_no_negative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-26 09:53+0000\n"
"PO-Revision-Date: 2019-02-26 09:53+0000\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_no_negative
#: code:addons/stock_no_negative/models/stock_quant.py:39
#, python-format
msgid " lot '%s'"
msgstr " lote '%s'"

#. module: stock_no_negative
#: model:ir.model.fields,field_description:stock_no_negative.field_product_category__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_product__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_template__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_stock_location__allow_negative_stock
msgid "Allow Negative Stock"
msgstr "Permitir Stock Negativo"

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_category__allow_negative_stock
msgid ""
"Allow negative stock levels for the stockable products attached to this "
"category. The options doesn't apply to products attached to sub-categories "
"of this category."
msgstr ""
"Permitir niveles de stock negativos para los productos en stock adjuntos a "
"esta categoría. Las opciones no se aplican a los productos adjuntos a "
"subcategorías de esta categoría."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_stock_location__allow_negative_stock
msgid ""
"Allow negative stock levels for the stockable products attached to this "
"location."
msgstr ""
"Permitir niveles de stock negativos para los productos en stock ubicados en "
"esta ubicación."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_product__allow_negative_stock
#: model:ir.model.fields,help:stock_no_negative.field_product_template__allow_negative_stock
msgid ""
"If this option is not active on this product nor on its product category and "
"that this product is a stockable product, then the validation of the related "
"stock moves will be blocked if the stock level becomes negative with the "
"stock move."
msgstr ""
"Si esta opción no está activa en este producto ni en su categoría de "
"producto y este producto es un producto almacenable, entonces la validación "
"de los movimientos de stock relacionados se bloqueará si el nivel de stock "
"se vuelve negativo con el movimiento de stock."

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

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_category
msgid "Product Category"
msgstr "Categoría de producto"

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"

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

#. module: stock_no_negative
#: code:addons/stock_no_negative/models/stock_quant.py:40
#, python-format
msgid ""
"You cannot validate this stock operation because the stock level of the "
"product '%s'%s would become negative (%s) on the stock location '%s' and "
"negative stock is not allowed for this product and/or location."
msgstr ""
"No se puede validar esta operación de stock porque el nivel de stock del "
"producto '%s'%s se volvería negativo (%s) en la ubicación de stock '%s' y no "
"se permite stock negativo para este producto y/o ubicación."
97 changes: 97 additions & 0 deletions stock_no_negative/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_no_negative
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-02-26 09:53+0000\n"
"PO-Revision-Date: 2019-02-26 09:53+0000\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_no_negative
#: code:addons/stock_no_negative/models/stock_quant.py:39
#, python-format
msgid " lot '%s'"
msgstr " lote '%s'"

#. module: stock_no_negative
#: model:ir.model.fields,field_description:stock_no_negative.field_product_category__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_product__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_product_template__allow_negative_stock
#: model:ir.model.fields,field_description:stock_no_negative.field_stock_location__allow_negative_stock
msgid "Allow Negative Stock"
msgstr "Permitir Stock Negativo"

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_category__allow_negative_stock
msgid ""
"Allow negative stock levels for the stockable products attached to this "
"category. The options doesn't apply to products attached to sub-categories "
"of this category."
msgstr ""
"Permitir niveles de stock negativos para los productos en stock adjuntos a "
"esta categoría. Las opciones no se aplican a los productos adjuntos a "
"subcategorías de esta categoría."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_stock_location__allow_negative_stock
msgid ""
"Allow negative stock levels for the stockable products attached to this "
"location."
msgstr ""
"Permitir niveles de stock negativos para los productos en stock ubicados en "
"esta ubicación."

#. module: stock_no_negative
#: model:ir.model.fields,help:stock_no_negative.field_product_product__allow_negative_stock
#: model:ir.model.fields,help:stock_no_negative.field_product_template__allow_negative_stock
msgid ""
"If this option is not active on this product nor on its product category and "
"that this product is a stockable product, then the validation of the related "
"stock moves will be blocked if the stock level becomes negative with the "
"stock move."
msgstr ""
"Si esta opción no está activa en este producto ni en su categoría de "
"producto y este producto es un producto almacenable, entonces la validación "
"de los movimientos de stock relacionados se bloqueará si el nivel de stock "
"se vuelve negativo con el movimiento de stock."

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

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_category
msgid "Product Category"
msgstr "Categoría de producto"

#. module: stock_no_negative
#: model:ir.model,name:stock_no_negative.model_product_template
msgid "Product Template"
msgstr "Plantilla de producto"

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

#. module: stock_no_negative
#: code:addons/stock_no_negative/models/stock_quant.py:40
#, python-format
msgid ""
"You cannot validate this stock operation because the stock level of the "
"product '%s'%s would become negative (%s) on the stock location '%s' and "
"negative stock is not allowed for this product and/or location."
msgstr ""
"No se puede validar esta operación de stock porque el nivel de stock del "
"producto '%s'%s se volvería negativo (%s) en la ubicación de stock '%s' y no "
"se permite stock negativo para este producto y/o ubicación."
Loading