diff --git a/README.md b/README.md index 079283e301c7..3009505a9678 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ addon | version | maintainers | summary [stock_quant_reservation_info_mrp](stock_quant_reservation_info_mrp/) | 14.0.1.1.1 | | Allows to see the manufacturing order related to the reserved info of Products [stock_quant_view_reservation](stock_quant_view_reservation/) | 14.0.1.0.1 | | Allows to see details of reservations on a quant [stock_removal_location_by_priority](stock_removal_location_by_priority/) | 14.0.1.0.0 | | Establish a removal priority on stock locations. -[stock_request](stock_request/) | 14.0.1.7.2 | | Internal request for stock +[stock_request](stock_request/) | 14.0.1.7.3 | | Internal request for stock [stock_request_analytic](stock_request_analytic/) | 14.0.1.1.0 | | Internal request for stock [stock_request_cancel_confirm](stock_request_cancel_confirm/) | 14.0.1.0.1 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Stock Request Cancel Confirm [stock_request_direction](stock_request_direction/) | 14.0.1.0.1 | [![max3903](https://github.com/max3903.png?size=30px)](https://github.com/max3903) | From or to your warehouse? diff --git a/stock_request/README.rst b/stock_request/README.rst index 18643e415347..e2152891f8d4 100644 --- a/stock_request/README.rst +++ b/stock_request/README.rst @@ -7,7 +7,7 @@ Stock Request !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:21b75f3a1923ee62ace68e8184587c413e06354849faf0e832ac2822bd9a36a2 + !! source digest: sha256:19dec8fd1c354191bba9294a2d718654990e9669b558290e17583ffb69aeda79 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/stock_request/__manifest__.py b/stock_request/__manifest__.py index a785d1e00f60..898837e11210 100644 --- a/stock_request/__manifest__.py +++ b/stock_request/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request", "summary": "Internal request for stock", - "version": "14.0.1.7.2", + "version": "14.0.1.7.3", "license": "LGPL-3", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/stock_request/i18n/ca.po b/stock_request/i18n/ca.po index 6ed9f3e3b51f..319d48ea049d 100644 --- a/stock_request/i18n/ca.po +++ b/stock_request/i18n/ca.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/de.po b/stock_request/i18n/de.po index 2c9f96e07f1c..c2bc6d9cc5d1 100644 --- a/stock_request/i18n/de.po +++ b/stock_request/i18n/de.po @@ -421,6 +421,14 @@ msgstr "Bestandsrouten" msgid "Is Follower" msgstr "Ist Follower" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/el_GR.po b/stock_request/i18n/el_GR.po index c4bebdc98158..75f7c7b42c17 100644 --- a/stock_request/i18n/el_GR.po +++ b/stock_request/i18n/el_GR.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/es.po b/stock_request/i18n/es.po index ad3a68bc0455..c97de9c0e175 100644 --- a/stock_request/i18n/es.po +++ b/stock_request/i18n/es.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-06 07:32+0000\n" -"PO-Revision-Date: 2023-07-06 09:32+0200\n" +"POT-Creation-Date: 2024-02-23 08:52+0000\n" +"PO-Revision-Date: 2024-02-23 09:53+0100\n" "Last-Translator: Víctor Martínez \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" @@ -421,6 +421,16 @@ msgstr "Rutas de inventarios" msgid "Is Follower" msgstr "Es Seguidor" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, fuzzy, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" +"No es posible dejar vacío un pedido de existencias (quizás deberías " +"cancelarlo)." + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" @@ -1223,6 +1233,3 @@ msgid "" msgstr "" "Debe seleccionada una unidad de medida de producto de la misma categoría que " "la unidad de medida por defecto del producto" - -#~ msgid "SMS Delivery error" -#~ msgstr "Error de entrega de SMS" diff --git a/stock_request/i18n/es_ES.po b/stock_request/i18n/es_ES.po index 24ef9c41859a..0ade6559e135 100644 --- a/stock_request/i18n/es_ES.po +++ b/stock_request/i18n/es_ES.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/eu.po b/stock_request/i18n/eu.po index 96609f30fe66..ed560c385dbc 100644 --- a/stock_request/i18n/eu.po +++ b/stock_request/i18n/eu.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/fi.po b/stock_request/i18n/fi.po index b37a07d4eda3..10a3b54c0ef0 100644 --- a/stock_request/i18n/fi.po +++ b/stock_request/i18n/fi.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/fr.po b/stock_request/i18n/fr.po index a8f57f57bd9a..21e3410b05a7 100644 --- a/stock_request/i18n/fr.po +++ b/stock_request/i18n/fr.po @@ -425,6 +425,14 @@ msgstr "Route logistique" msgid "Is Follower" msgstr "Est un abonné" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/fr_CH.po b/stock_request/i18n/fr_CH.po index b726fbe6bf29..e84415254258 100644 --- a/stock_request/i18n/fr_CH.po +++ b/stock_request/i18n/fr_CH.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/fr_FR.po b/stock_request/i18n/fr_FR.po index ae2e3eb8ccb4..c2b608c153f7 100644 --- a/stock_request/i18n/fr_FR.po +++ b/stock_request/i18n/fr_FR.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/gl.po b/stock_request/i18n/gl.po index e2ae9b82720c..791dde5b473c 100644 --- a/stock_request/i18n/gl.po +++ b/stock_request/i18n/gl.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/hr.po b/stock_request/i18n/hr.po index 5a4bca8de07a..02c22ba5b093 100644 --- a/stock_request/i18n/hr.po +++ b/stock_request/i18n/hr.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/hr_HR.po b/stock_request/i18n/hr_HR.po index b1dc3bb7e83c..a919d75835e1 100644 --- a/stock_request/i18n/hr_HR.po +++ b/stock_request/i18n/hr_HR.po @@ -414,6 +414,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/it.po b/stock_request/i18n/it.po index dee1fcb86efe..e0c920e2ecd0 100644 --- a/stock_request/i18n/it.po +++ b/stock_request/i18n/it.po @@ -420,6 +420,14 @@ msgstr "Percorsi di inventario" msgid "Is Follower" msgstr "Segue" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/nl.po b/stock_request/i18n/nl.po index 800af737ffa9..cfb62554f1e4 100644 --- a/stock_request/i18n/nl.po +++ b/stock_request/i18n/nl.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/nl_NL.po b/stock_request/i18n/nl_NL.po index 8c69d3e3b788..2b4869a65f53 100644 --- a/stock_request/i18n/nl_NL.po +++ b/stock_request/i18n/nl_NL.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/pt.po b/stock_request/i18n/pt.po index bb050ee4aa01..5068e2638e3c 100644 --- a/stock_request/i18n/pt.po +++ b/stock_request/i18n/pt.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/pt_BR.po b/stock_request/i18n/pt_BR.po index d0dcaf9995dc..55c1aa7b4468 100644 --- a/stock_request/i18n/pt_BR.po +++ b/stock_request/i18n/pt_BR.po @@ -420,6 +420,14 @@ msgstr "Rotas do Inventário" msgid "Is Follower" msgstr "É Seguidor" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/ro.po b/stock_request/i18n/ro.po index 357dc50dbe4a..26fe841625a3 100644 --- a/stock_request/i18n/ro.po +++ b/stock_request/i18n/ro.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/ru.po b/stock_request/i18n/ru.po index 5e82fdb866d7..13797c593901 100644 --- a/stock_request/i18n/ru.po +++ b/stock_request/i18n/ru.po @@ -414,6 +414,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/sl.po b/stock_request/i18n/sl.po index 93120f3b046e..1badc672607f 100644 --- a/stock_request/i18n/sl.po +++ b/stock_request/i18n/sl.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/stock_request.pot b/stock_request/i18n/stock_request.pot index 359aea1daed3..1719dedc0d80 100644 --- a/stock_request/i18n/stock_request.pot +++ b/stock_request/i18n/stock_request.pot @@ -407,6 +407,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/tr.po b/stock_request/i18n/tr.po index 7f7aee601bce..076601e3ae63 100644 --- a/stock_request/i18n/tr.po +++ b/stock_request/i18n/tr.po @@ -412,6 +412,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/tr_TR.po b/stock_request/i18n/tr_TR.po index 53c12b7be9c7..2ed462a57d78 100644 --- a/stock_request/i18n/tr_TR.po +++ b/stock_request/i18n/tr_TR.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/vi_VN.po b/stock_request/i18n/vi_VN.po index d185a355ece2..38bd218f134f 100644 --- a/stock_request/i18n/vi_VN.po +++ b/stock_request/i18n/vi_VN.po @@ -413,6 +413,14 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/i18n/zh_CN.po b/stock_request/i18n/zh_CN.po index 893bd53852ce..530ce0cd295f 100644 --- a/stock_request/i18n/zh_CN.po +++ b/stock_request/i18n/zh_CN.po @@ -416,6 +416,14 @@ msgstr "库存路由" msgid "Is Follower" msgstr "是关注者" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:0 +#, python-format +msgid "" +"It is not possible to set empty stock request orders (maybe you should " +"cancel it)." +msgstr "" + #. module: stock_request #: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form msgid "Items" diff --git a/stock_request/models/stock_request_order.py b/stock_request/models/stock_request_order.py index e5f846798c4d..7ae87e175223 100644 --- a/stock_request/models/stock_request_order.py +++ b/stock_request/models/stock_request_order.py @@ -320,6 +320,16 @@ def _check_location_company(self): ) ) + @api.constrains("stock_request_ids") + def _check_location_empty_stock_request_ids(self): + if any(not request.stock_request_ids for request in self): + raise ValidationError( + _( + "It is not possible to set empty stock request orders (maybe " + "you should cancel it)." + ) + ) + @api.model def _create_from_product_multiselect(self, products): if not products: diff --git a/stock_request/static/description/index.html b/stock_request/static/description/index.html index a4f93953b6fe..92d4612e6834 100644 --- a/stock_request/static/description/index.html +++ b/stock_request/static/description/index.html @@ -1,4 +1,3 @@ - @@ -367,7 +366,7 @@

Stock Request

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:21b75f3a1923ee62ace68e8184587c413e06354849faf0e832ac2822bd9a36a2 +!! source digest: sha256:19dec8fd1c354191bba9294a2d718654990e9669b558290e17583ffb69aeda79 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

This module was written to allow users to request products that are diff --git a/stock_request/tests/test_stock_request.py b/stock_request/tests/test_stock_request.py index e9eaa06acd52..90ba1fa92c8f 100644 --- a/stock_request/tests/test_stock_request.py +++ b/stock_request/tests/test_stock_request.py @@ -6,7 +6,7 @@ from datetime import datetime from odoo import exceptions, fields -from odoo.tests import common, new_test_user +from odoo.tests import Form, common, new_test_user class TestStockRequest(common.TransactionCase): @@ -306,6 +306,11 @@ def test_onchanges(self): self.assertEqual(stock_request.company_id, self.main_company) self.assertEqual(stock_request.location_id, self.warehouse.lot_stock_id) + def test_stock_request_order_empty(self): + request_order = Form(self.request_order) + with self.assertRaises(exceptions.ValidationError): + request_order.save() + def test_stock_request_order_validations_01(self): """Testing the discrepancy in warehouse_id between stock request and order"""