Skip to content

Commit

Permalink
Merge 7d242ce into 6d41d7a
Browse files Browse the repository at this point in the history
  • Loading branch information
ps-tubtim committed Jan 21, 2020
2 parents 6d41d7a + 7d242ce commit c7d813a
Show file tree
Hide file tree
Showing 19 changed files with 916 additions and 0 deletions.
75 changes: 75 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
================================================
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/13.0/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-13-0/stock-logistics-warehouse-13-0-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/13.0
: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:%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
~~~~~~~

* Eficent

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

* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@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/13.0/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
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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": "13.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"],
"installable": True,
}
30 changes: 30 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/de.po
Original file line number Diff line number Diff line change
@@ -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
# 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
msgid "Quantity On Location (Unreserved)"
msgstr "Bestand am Lagerplatz (nicht reserviert)"
29 changes: 29 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# 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
msgid "Quantity On Location (Unreserved)"
msgstr ""
30 changes: 30 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/es_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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
msgid "Quantity On Location (Unreserved)"
msgstr ""
31 changes: 31 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -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: 2019-08-30 14:23+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\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"
"X-Generator: Weblate 3.8\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
msgid "Quantity On Location (Unreserved)"
msgstr "Quantidade no local (não reservada)"
30 changes: 30 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/sl.po
Original file line number Diff line number Diff line change
@@ -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: 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
msgid "Quantity On Location (Unreserved)"
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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 12.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
msgid "Quantity On Location (Unreserved)"
msgstr ""

27 changes: 27 additions & 0 deletions stock_warehouse_orderpoint_stock_info_unreserved/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-10-16 15:58+0000\n"
"Last-Translator: 黎伟杰 <674416404@qq.com>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\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
msgid "Quantity On Location (Unreserved)"
msgstr "位置数量(未预留)"
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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 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",
)

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"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
Original file line number Diff line number Diff line change
@@ -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 c7d813a

Please sign in to comment.