mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_reserve: Migration to 14.0
TT41080
This commit is contained in:
@@ -14,13 +14,13 @@ Stock Reservation
|
||||
: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_reserve
|
||||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve
|
||||
: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_reserve
|
||||
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_reserve
|
||||
: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
|
||||
:target: https://runbot.odoo-community.org/runbot/153/14.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -63,7 +63,7 @@ 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_reserve%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_reserve%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.
|
||||
|
||||
@@ -88,6 +88,6 @@ 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_reserve>`_ project on GitHub.
|
||||
This module is part of the `OCA/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -913,10 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantitat"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantitat"
|
||||
|
||||
@@ -914,9 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Zakázka"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Pravidlo zadávání zakázek"
|
||||
|
||||
@@ -913,22 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Kommissionsart"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Beschaffung"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Beschaffungsregel"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Menge"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Menge"
|
||||
|
||||
#~ msgid "Reservation Stock"
|
||||
#~ msgstr "Reservierter Bestand"
|
||||
|
||||
@@ -914,10 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Ποσότητα"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Ποσότητα"
|
||||
|
||||
@@ -972,15 +972,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Tipo de albarán"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Abastecimiento"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Regla de abastecimiento"
|
||||
|
||||
#~ msgid "Reservation Stock"
|
||||
#~ msgstr "Reserva de existencias"
|
||||
|
||||
@@ -913,13 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Määrä"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Määrä"
|
||||
|
||||
#~ msgid "Reservation Stock"
|
||||
#~ msgstr "Varattu"
|
||||
|
||||
@@ -913,19 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Type de préparation"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Procurement"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Règle d'approvisionnement"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantité"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantité"
|
||||
|
||||
@@ -914,10 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantité"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantité"
|
||||
|
||||
@@ -913,10 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Cantidade"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Cantidade"
|
||||
|
||||
@@ -915,16 +915,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Nabava"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Pavilo nabave"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Količina"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Količina"
|
||||
|
||||
@@ -915,10 +915,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Količina"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Količina"
|
||||
|
||||
@@ -914,19 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Tipo Picking"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Approvvigionamento"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Regola d'Approvvigionamento"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantià"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantià"
|
||||
|
||||
@@ -913,10 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Hoeveelheid"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Hoeveelheid"
|
||||
|
||||
@@ -914,10 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Hoeveelheid"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Hoeveelheid"
|
||||
|
||||
@@ -915,10 +915,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Aantal"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Aantal"
|
||||
|
||||
@@ -913,10 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantidade"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantidade"
|
||||
|
||||
@@ -914,16 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Local destino"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Aprovisionamento"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Quantidade"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Quantidade"
|
||||
|
||||
@@ -914,6 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Aquisições"
|
||||
|
||||
@@ -914,13 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Aprovizionare"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Cantitate"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Cantitate"
|
||||
|
||||
@@ -915,10 +915,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Кол-во"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Кол-во"
|
||||
|
||||
@@ -913,6 +913,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Obstarávanie"
|
||||
|
||||
@@ -934,82 +934,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Checks if the move has some stock reserved"
|
||||
#~ msgstr "Preveri, če premik vsebuje kaj rezervacij zaloge"
|
||||
|
||||
#~ msgid "Destination Move"
|
||||
#~ msgstr "Ciljni premik"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "It specifies attributes of packaging like type, quantity of packaging,etc."
|
||||
#~ msgstr "Določi atribute pakiranja, kot so tip, količina pakiranj, itd."
|
||||
|
||||
#~ msgid "Linked Operations"
|
||||
#~ msgstr "Povezane operacije"
|
||||
|
||||
#~ msgid "Move Split From"
|
||||
#~ msgstr "Premik razdeljen od"
|
||||
|
||||
#~ msgid "Moved Quants"
|
||||
#~ msgstr "Premaknjeni kvanti"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Operations that impact this move for the computation of the remaining "
|
||||
#~ "quantities"
|
||||
#~ msgstr "Operacije, ki vplivajo na ta premik pri izračunu preostalih količin"
|
||||
|
||||
#~ msgid "Partially Available"
|
||||
#~ msgstr "Delno na voljo"
|
||||
|
||||
#~ msgid "Picking Type"
|
||||
#~ msgstr "Tip zbirnika"
|
||||
|
||||
#~ msgid "Preferred route to be followed by the procurement order"
|
||||
#~ msgstr "Prednostna proga za oskrbovalni nalog"
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Oskrbovanje"
|
||||
|
||||
#~ msgid "Procurement Rule"
|
||||
#~ msgstr "Oskrbovalno pravilo"
|
||||
|
||||
#~ msgid "Push Rule"
|
||||
#~ msgstr "Pravilo potiska"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Količina"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Delno na voljo"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity done store"
|
||||
#~ msgstr "Rezervirana količina"
|
||||
|
||||
#~ msgid "Remaining Quantity"
|
||||
#~ msgstr "Preostala količina"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Remaining Quantity in default UoM according to operations matched with "
|
||||
#~ "this move"
|
||||
#~ msgstr ""
|
||||
#~ "Preostala količina v privzeti EM glede na operacije, ki se ujemajo s tem "
|
||||
#~ "premikom"
|
||||
|
||||
#~ msgid "Reservation Stock"
|
||||
#~ msgstr "Rezervirana zaloga"
|
||||
|
||||
#~ msgid "Reserved quants"
|
||||
#~ msgstr "Rezervirani kvanti"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Technical field used to track the origin of a split move, which can be "
|
||||
#~ "useful in case of debug"
|
||||
#~ msgstr ""
|
||||
#~ "Tehnično polje za sledenje izvora razdelitve premika, ki je lahko "
|
||||
#~ "koristno pri odpravljanju napak."
|
||||
|
||||
#~ msgid "The push rule that created this stock move"
|
||||
#~ msgstr "Potisno pravilo, ki je ustvarilo ta premik zaloge"
|
||||
|
||||
@@ -914,13 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Satın alma"
|
||||
|
||||
#~ msgid "Quantity"
|
||||
#~ msgstr "Miktar"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Quantity Available"
|
||||
#~ msgstr "Miktar"
|
||||
|
||||
@@ -914,6 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "Mua sắm / Cung ứng"
|
||||
|
||||
@@ -914,6 +914,3 @@ msgstr ""
|
||||
#: model:ir.model.fields,field_description:stock_reserve.field_stock_reservation__workorder_id
|
||||
msgid "Work Order To Consume"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Procurement"
|
||||
#~ msgstr "补货"
|
||||
|
||||
@@ -20,7 +20,7 @@ class ProductTemplate(models.Model):
|
||||
self.ensure_one()
|
||||
ref = "stock_reserve.action_stock_reservation_tree"
|
||||
product_ids = self.mapped("product_variant_ids.id")
|
||||
action_dict = self.env.ref(ref).read()[0]
|
||||
action_dict = self.env["ir.actions.act_window"]._for_xml_id(ref)
|
||||
action_dict["domain"] = [("product_id", "in", product_ids)]
|
||||
action_dict["context"] = {
|
||||
"search_default_draft": 1,
|
||||
@@ -49,7 +49,7 @@ class ProductProduct(models.Model):
|
||||
def action_view_reservations(self):
|
||||
self.ensure_one()
|
||||
ref = "stock_reserve.action_stock_reservation_tree"
|
||||
action_dict = self.env.ref(ref).read()[0]
|
||||
action_dict = self.env["ir.actions.act_window"]._for_xml_id(ref)
|
||||
action_dict["domain"] = [("product_id", "=", self.id)]
|
||||
action_dict["context"] = {
|
||||
"search_default_draft": 1,
|
||||
|
||||
@@ -177,8 +177,9 @@ class StockReservation(models.Model):
|
||||
|
||||
def open_move(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("stock.stock_move_action")
|
||||
action_dict = action.read()[0]
|
||||
action_dict = self.env["ir.actions.act_window"]._for_xml_id(
|
||||
"stock.stock_move_action"
|
||||
)
|
||||
action_dict["name"] = _("Reservation Move")
|
||||
# open directly in the form view
|
||||
view_id = self.env.ref("stock.view_move_form").id
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Stock Reservation</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_reserve"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_reserve"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_reserve"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/153/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Allows to create stock reservations on products.</p>
|
||||
<p>Each reservation can have a validity date, once passed, the reservation
|
||||
is automatically lifted.</p>
|
||||
@@ -407,7 +407,7 @@ owner on the reservation.</p>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_reserve%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_reserve%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -425,7 +425,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<p>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.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_reserve">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_reserve">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,31 +23,26 @@ class TestStockReserve(common.TransactionCase):
|
||||
}
|
||||
)
|
||||
|
||||
def _create_stock_reservation(self, qty):
|
||||
form_reservation = Form(self.env["stock.reservation"])
|
||||
form_reservation.product_id = self.product
|
||||
form_reservation.product_uom_qty = qty
|
||||
form_reservation.location_id = self.warehouse.lot_stock_id
|
||||
return form_reservation.save()
|
||||
|
||||
def test_reservation_and_reservation_release(self):
|
||||
form_reservation_1 = Form(self.env["stock.reservation"])
|
||||
form_reservation_1.product_id = self.product
|
||||
form_reservation_1.product_uom_qty = 6
|
||||
form_reservation_1.location_id = self.warehouse.lot_stock_id
|
||||
reservation_1 = form_reservation_1.save()
|
||||
reservation_1 = self._create_stock_reservation(6)
|
||||
reservation_1.reserve()
|
||||
self.assertEqual(self.product.virtual_available, 4)
|
||||
form_reservation_2 = Form(self.env["stock.reservation"])
|
||||
form_reservation_2.product_id = self.product
|
||||
form_reservation_2.product_uom_qty = 1
|
||||
form_reservation_2.location_id = self.warehouse.lot_stock_id
|
||||
reservation_2 = form_reservation_2.save()
|
||||
reservation_2 = self._create_stock_reservation(1)
|
||||
reservation_2.reserve()
|
||||
self.assertEqual(self.product.virtual_available, 3)
|
||||
reservation_1.release_reserve()
|
||||
self.assertEqual(self.product.virtual_available, 9)
|
||||
|
||||
def test_cron_release(self):
|
||||
form_reservation_1 = Form(self.env["stock.reservation"])
|
||||
form_reservation_1.product_id = self.product
|
||||
form_reservation_1.product_uom_qty = 6
|
||||
form_reservation_1.location_id = self.warehouse.lot_stock_id
|
||||
form_reservation_1.date_validity = fields.Date.from_string("2021-01-01")
|
||||
reservation_1 = form_reservation_1.save()
|
||||
reservation_1 = self._create_stock_reservation(6)
|
||||
reservation_1.date_validity = fields.Date.from_string("2021-01-01")
|
||||
reservation_1.reserve()
|
||||
self.assertEqual(self.product.virtual_available, 4)
|
||||
cron = self.env.ref("stock_reserve.ir_cron_release_stock_reservation")
|
||||
@@ -55,11 +50,7 @@ class TestStockReserve(common.TransactionCase):
|
||||
self.assertEqual(self.product.virtual_available, 10)
|
||||
|
||||
def test_cron_reserve(self):
|
||||
form_reservation_1 = Form(self.env["stock.reservation"])
|
||||
form_reservation_1.product_id = self.product
|
||||
form_reservation_1.product_uom_qty = 11
|
||||
form_reservation_1.location_id = self.warehouse.lot_stock_id
|
||||
reservation_1 = form_reservation_1.save()
|
||||
reservation_1 = self._create_stock_reservation(11)
|
||||
reservation_1.reserve()
|
||||
self.assertEqual(reservation_1.state, "partially_available")
|
||||
self.env["stock.quant"].create(
|
||||
|
||||
Reference in New Issue
Block a user