Skip to content

Commit

Permalink
Merge 2405ae9 into 0d9eaf5
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Apr 24, 2019
2 parents 0d9eaf5 + 2405ae9 commit 4794904
Show file tree
Hide file tree
Showing 18 changed files with 894 additions and 0 deletions.
74 changes: 74 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/README.rst
@@ -0,0 +1,74 @@
================================================
Stock Warehouse Orderpoint Stock Info Unreserved
================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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/12.0-mig-stock_warehouse_orderpoint_stock_info_unreserved/stock_warehouse_orderpoint_stock_info_unreserved
: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-12-0-mig-stock_warehouse_orderpoint_stock_info_unreserved/stock-logistics-warehouse-12-0-mig-stock_warehouse_orderpoint_stock_info_unreserved-stock_warehouse_orderpoint_stock_info_unreserved
: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/12.0-mig-stock_warehouse_orderpoint_stock_info_unreserved
:alt: Try me on Runbot

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

This modules allows to display the availability of stock on hand and unreserved on a reordering rule.

**Table of contents**

.. contents::
:local:

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_orderpoint_stock_info_unreserved%0Aversion:%2012.0-mig-stock_warehouse_orderpoint_stock_info_unreserved%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
~~~~~~~

* Eficent

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

* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>

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-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0-mig-stock_warehouse_orderpoint_stock_info_unreserved/stock_warehouse_orderpoint_stock_info_unreserved>`_ 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_warehouse_orderpoint_stock_info_unreserved/__init__.py
@@ -0,0 +1,5 @@
# Copyright 2018 Camptocamp SA
# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
20 changes: 20 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/__manifest__.py
@@ -0,0 +1,20 @@
# Copyright 2018 Camptocamp SA
# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Stock Warehouse Orderpoint Stock Info Unreserved",
"version": "12.0.1.0.0",
"depends": [
"stock_warehouse_orderpoint_stock_info",
"stock_available_unreserved"
],
"author": "Eficent, "
"Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"category": "Warehouse",
"license": "AGPL-3",
"data": [
"views/stock_warehouse_orderpoint_view.xml",
],
}
31 changes: 31 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/de.po
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
# Rudolf Schnapka <rs@techno-flex.de>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-29 13:13+0000\n"
"PO-Revision-Date: 2017-06-29 13:13+0000\n"
"Last-Translator: Rudolf Schnapka <rs@techno-flex.de>, 2017\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\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"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Mindestbestandsregel"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr "Bestand am Lagerplatz (nicht reserviert)"
30 changes: 30 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/es.po
@@ -0,0 +1,30 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-10 05:36+0000\n"
"PO-Revision-Date: 2017-06-10 05:36+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\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"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Regla de inventario mínimo"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr ""
31 changes: 31 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/es_ES.po
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
# Translators:
# Daniel <dani_dca@hotmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-07-26 11:42+0000\n"
"PO-Revision-Date: 2017-07-26 11:42+0000\n"
"Last-Translator: Daniel <dani_dca@hotmail.com>, 2017\n"
"Language-Team: Spanish (Spain) (https://www.transifex.com/oca/teams/23907/"
"es_ES/)\n"
"Language: es_ES\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"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Regla inventario mínimo"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr ""
31 changes: 31 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/pt_BR.po
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-10 05:36+0000\n"
"PO-Revision-Date: 2017-06-10 05:36+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
"teams/23907/pt_BR/)\n"
"Language: pt_BR\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"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Regra minima de inventário"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr ""
31 changes: 31 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/sl.po
@@ -0,0 +1,31 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-10 05:36+0000\n"
"PO-Revision-Date: 2017-06-10 05:36+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3);\n"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr "Pravilo minimalne zaloge"

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr ""
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_warehouse_orderpoint_stock_info_unreserved
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.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_orderpoint_stock_info_unreserved
#: model:ir.model,name:stock_warehouse_orderpoint_stock_info_unreserved.model_stock_warehouse_orderpoint
msgid "Minimum Inventory Rule"
msgstr ""

#. module: stock_warehouse_orderpoint_stock_info_unreserved
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_product_location_qty_available_not_res
#: model:ir.model.fields,field_description:stock_warehouse_orderpoint_stock_info_unreserved.field_stock_warehouse_orderpoint_template_product_location_qty_available_not_res
msgid "Quantity On Location (Unreserved)"
msgstr ""

@@ -0,0 +1,5 @@
# Copyright 2018 Camptocamp SA
# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import stock_warehouse_orderpoint
@@ -0,0 +1,31 @@
# Copyright 2018 Camptocamp SA
# Copyright 2016 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from collections import defaultdict
from odoo import api, fields, models


class StockWarehouseOrderpoint(models.Model):
_inherit = 'stock.warehouse.orderpoint'

product_location_qty_available_not_res = fields.Float(
string='Quantity On Location (Unreserved)',
compute='_compute_product_available_qty',
)

@api.multi
def _compute_product_available_qty(self):
super()._compute_product_available_qty()
op_by_loc = defaultdict(set)
for order in self:
op_by_loc[order.location_id].add(order.id)
for location_id, order_in_loc in op_by_loc.items():
order_in_loc = self.browse(order_in_loc)
products = order_in_loc.mapped('product_id').with_context(
location=location_id.id
)._compute_qty_available_not_reserved()
for order in order_in_loc:
product = products[order.product_id.id]
order.product_location_qty_available_not_res = \
product['qty_available_not_res']
@@ -0,0 +1,2 @@
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>
@@ -0,0 +1 @@
This modules allows to display the availability of stock on hand and unreserved on a reordering rule.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4794904

Please sign in to comment.