diff --git a/stock_request/README.rst b/stock_request/README.rst index 2fa5cdb07..69ff494bc 100644 --- a/stock_request/README.rst +++ b/stock_request/README.rst @@ -53,7 +53,7 @@ also cancelled. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/153/11.0 + :target: https://runbot.odoo-community.org/runbot/153/12.0 Bug Tracker @@ -75,6 +75,7 @@ Contributors * Atte Isopuro * Lois Rilo * Raul Martin +* Serpent Consulting Services Pvt. Ltd. Maintainer ---------- diff --git a/stock_request/__manifest__.py b/stock_request/__manifest__.py index bc1def771..20ac7bb2a 100644 --- a/stock_request/__manifest__.py +++ b/stock_request/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Request", "summary": "Internal request for stock", - "version": "11.0.3.1.1", + "version": "12.0.1.0.0", "license": "LGPL-3", "website": "https://github.com/stock-logistics-warehouse", "author": "Eficent, " diff --git a/stock_request/data/stock_request_sequence_data.xml b/stock_request/data/stock_request_sequence_data.xml index 985be8057..776483ecd 100644 --- a/stock_request/data/stock_request_sequence_data.xml +++ b/stock_request/data/stock_request_sequence_data.xml @@ -1,22 +1,20 @@ - - + - - Stock Request - stock.request - SR/ - 5 - - + + Stock Request + stock.request + SR/ + 5 + + - - Stock Request Order - stock.request.order - SRO/ - 5 - - + + Stock Request Order + stock.request.order + SRO/ + 5 + + - diff --git a/stock_request/i18n/ca.po b/stock_request/i18n/ca.po index 0fb6900c4..6a97b5b15 100644 --- a/stock_request/i18n/ca.po +++ b/stock_request/i18n/ca.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/de.po b/stock_request/i18n/de.po index d81d95868..d8db29059 100644 --- a/stock_request/i18n/de.po +++ b/stock_request/i18n/de.po @@ -212,7 +212,7 @@ msgstr "Anforderungs-Anwender" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "ID" @@ -695,6 +695,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/el_GR.po b/stock_request/i18n/el_GR.po index 28f0e4df4..a148f83eb 100644 --- a/stock_request/i18n/el_GR.po +++ b/stock_request/i18n/el_GR.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/es.po b/stock_request/i18n/es.po index 96c83717b..c7f82fb64 100644 --- a/stock_request/i18n/es.po +++ b/stock_request/i18n/es.po @@ -208,7 +208,7 @@ msgstr "Agrupa las solicitudes en pedidos" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "ID" @@ -684,6 +684,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "La polĂ­tica de albaranes debe coincidir" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/es_ES.po b/stock_request/i18n/es_ES.po index 357b15b0e..99e9fd025 100644 --- a/stock_request/i18n/es_ES.po +++ b/stock_request/i18n/es_ES.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/eu.po b/stock_request/i18n/eu.po index 98ff1e58f..9224e9705 100644 --- a/stock_request/i18n/eu.po +++ b/stock_request/i18n/eu.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/fi.po b/stock_request/i18n/fi.po index 72a96872c..9f084eb73 100644 --- a/stock_request/i18n/fi.po +++ b/stock_request/i18n/fi.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/fr.po b/stock_request/i18n/fr.po index 989376079..14d3b7907 100644 --- a/stock_request/i18n/fr.po +++ b/stock_request/i18n/fr.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/fr_CH.po b/stock_request/i18n/fr_CH.po index 492c8c735..af5ea74c7 100644 --- a/stock_request/i18n/fr_CH.po +++ b/stock_request/i18n/fr_CH.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/fr_FR.po b/stock_request/i18n/fr_FR.po index 56cee1bb7..cea60c685 100644 --- a/stock_request/i18n/fr_FR.po +++ b/stock_request/i18n/fr_FR.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/gl.po b/stock_request/i18n/gl.po index 66519e3f5..c48481246 100644 --- a/stock_request/i18n/gl.po +++ b/stock_request/i18n/gl.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/hr.po b/stock_request/i18n/hr.po index 8d1b20689..09cc11e7e 100644 --- a/stock_request/i18n/hr.po +++ b/stock_request/i18n/hr.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/hr_HR.po b/stock_request/i18n/hr_HR.po index 4c225982c..e915025e3 100644 --- a/stock_request/i18n/hr_HR.po +++ b/stock_request/i18n/hr_HR.po @@ -206,7 +206,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -672,6 +672,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/it.po b/stock_request/i18n/it.po index a93a38221..48be9f580 100644 --- a/stock_request/i18n/it.po +++ b/stock_request/i18n/it.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/nl.po b/stock_request/i18n/nl.po index 319efc156..51fda6d36 100644 --- a/stock_request/i18n/nl.po +++ b/stock_request/i18n/nl.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/nl_NL.po b/stock_request/i18n/nl_NL.po index 4d4e6767e..240c32631 100644 --- a/stock_request/i18n/nl_NL.po +++ b/stock_request/i18n/nl_NL.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/pt.po b/stock_request/i18n/pt.po index 7e4c5d955..58b7241fc 100644 --- a/stock_request/i18n/pt.po +++ b/stock_request/i18n/pt.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/pt_BR.po b/stock_request/i18n/pt_BR.po index 76c6a20a1..318bd144a 100644 --- a/stock_request/i18n/pt_BR.po +++ b/stock_request/i18n/pt_BR.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/ro.po b/stock_request/i18n/ro.po index 30b3b7637..6d3c84ee4 100644 --- a/stock_request/i18n/ro.po +++ b/stock_request/i18n/ro.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/ru.po b/stock_request/i18n/ru.po index f324fb57d..433e17329 100644 --- a/stock_request/i18n/ru.po +++ b/stock_request/i18n/ru.po @@ -206,7 +206,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -672,6 +672,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/sl.po b/stock_request/i18n/sl.po index 18082e66d..648a5b9e9 100644 --- a/stock_request/i18n/sl.po +++ b/stock_request/i18n/sl.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/stock_request.pot b/stock_request/i18n/stock_request.pot index bbab830f5..ef88aaa8d 100644 --- a/stock_request/i18n/stock_request.pot +++ b/stock_request/i18n/stock_request.pot @@ -200,7 +200,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -660,6 +660,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/tr.po b/stock_request/i18n/tr.po index 018162b93..a0ea719b3 100644 --- a/stock_request/i18n/tr.po +++ b/stock_request/i18n/tr.po @@ -204,7 +204,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -670,6 +670,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/tr_TR.po b/stock_request/i18n/tr_TR.po index 8ea8db1cc..f4cf274c6 100644 --- a/stock_request/i18n/tr_TR.po +++ b/stock_request/i18n/tr_TR.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/vi_VN.po b/stock_request/i18n/vi_VN.po index 4ff5b2921..c27b3f836 100644 --- a/stock_request/i18n/vi_VN.po +++ b/stock_request/i18n/vi_VN.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/i18n/zh_CN.po b/stock_request/i18n/zh_CN.po index 809bcb789..bab2b7d9a 100644 --- a/stock_request/i18n/zh_CN.po +++ b/stock_request/i18n/zh_CN.po @@ -205,7 +205,7 @@ msgstr "" #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation_id #: model:ir.model.fields,field_description:stock_request.field_stock_request_id -#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5327 +#: model:ir.model.fields,field_description:stock_request.field_stock_request_order_id_5885 msgid "ID" msgstr "" @@ -671,6 +671,12 @@ msgstr "" msgid "The picking policy must be equal to the order" msgstr "" +#. module: stock_request +#: code:addons/stock_request/models/stock_request_order.py:290 +#, python-format +msgid "This action only works in the context of products" +msgstr "" + #. module: stock_request #: model:ir.model,name:stock_request.model_stock_picking msgid "Transfer" diff --git a/stock_request/models/__init__.py b/stock_request/models/__init__.py index 6d87138e8..fd01e5671 100644 --- a/stock_request/models/__init__.py +++ b/stock_request/models/__init__.py @@ -4,7 +4,7 @@ from . import stock_request_allocation from . import stock_request_order from . import stock_move from . import stock_picking -from . import procurement_rule +from . import stock_rule from . import stock_move_line from . import res_config_settings from . import stock_warehouse diff --git a/stock_request/models/stock_request.py b/stock_request/models/stock_request.py index a5f3baaa4..bcd7d8a3a 100644 --- a/stock_request/models/stock_request.py +++ b/stock_request/models/stock_request.py @@ -107,12 +107,12 @@ class StockRequest(models.Model): @api.depends('allocation_ids') def _compute_move_ids(self): - for request in self.sudo(): + for request in self: request.move_ids = request.allocation_ids.mapped('stock_move_id') @api.depends('allocation_ids') def _compute_picking_ids(self): - for request in self.sudo(): + for request in self: request.picking_count = 0 request.picking_ids = self.env['stock.picking'] request.picking_ids = request.move_ids.filtered( @@ -123,7 +123,7 @@ class StockRequest(models.Model): 'allocation_ids.stock_move_id.move_line_ids', 'allocation_ids.stock_move_id.move_line_ids.qty_done') def _compute_qty(self): - for request in self.sudo(): + for request in self: done_qty = sum(request.allocation_ids.mapped( 'allocated_product_qty')) open_qty = sum(request.allocation_ids.mapped('open_product_qty')) diff --git a/stock_request/models/stock_request_abstract.py b/stock_request/models/stock_request_abstract.py index ffa33b606..3631071fa 100644 --- a/stock_request/models/stock_request_abstract.py +++ b/stock_request/models/stock_request_abstract.py @@ -52,7 +52,7 @@ class StockRequest(models.AbstractModel): readonly=True, ) product_uom_id = fields.Many2one( - 'product.uom', 'Product Unit of Measure', + 'uom.uom', 'Product Unit of Measure', required=True, default=lambda self: self._context.get('product_uom_id', False), ) @@ -84,7 +84,7 @@ class StockRequest(models.AbstractModel): ondelete='restrict') route_ids = fields.Many2many( - 'stock.location.route', string='Route', + 'stock.location.route', string='Routes', compute='_compute_route_ids', readonly=True, ) @@ -112,7 +112,7 @@ class StockRequest(models.AbstractModel): routes |= wh_routes parents = record.get_parents().ids record.route_ids = routes.filtered(lambda r: any( - p.location_id.id in parents for p in r.pull_ids)) + p.location_id.id in parents for p in r.rule_ids)) def get_parents(self): location = self.location_id diff --git a/stock_request/models/stock_request_allocation.py b/stock_request/models/stock_request_allocation.py index 68558c3b3..99b05fb7f 100644 --- a/stock_request/models/stock_request_allocation.py +++ b/stock_request/models/stock_request_allocation.py @@ -27,7 +27,7 @@ class StockRequestAllocation(models.Model): related='stock_request_id.product_id', readonly=True, ) - product_uom_id = fields.Many2one(string='UoM', comodel_name='product.uom', + product_uom_id = fields.Many2one(string='UoM', comodel_name='uom.uom', related='stock_request_id.product_uom_id', readonly=True, ) diff --git a/stock_request/models/stock_request_order.py b/stock_request/models/stock_request_order.py index 9c177986d..a1654020a 100644 --- a/stock_request/models/stock_request_order.py +++ b/stock_request/models/stock_request_order.py @@ -287,7 +287,7 @@ class StockRequestOrder(models.Model): return False if products._name not in ('product.product', 'product.template'): raise ValidationError( - "This action only works in the context of products") + _("This action only works in the context of products")) if products._name == 'product.template': # search instead of mapped so we don't include archived variants products = self.env['product.product'].search([ diff --git a/stock_request/models/procurement_rule.py b/stock_request/models/stock_rule.py similarity index 62% rename from stock_request/models/procurement_rule.py rename to stock_request/models/stock_rule.py index 3d811ec3e..d0c6df162 100644 --- a/stock_request/models/procurement_rule.py +++ b/stock_request/models/stock_rule.py @@ -4,17 +4,17 @@ from odoo import models -class ProcurementRule(models.Model): - _inherit = 'procurement.rule' +class StockRule(models.Model): + _inherit = 'stock.rule' def _get_stock_move_values(self, product_id, product_qty, product_uom, location_id, name, origin, values, group_id): - result = super(ProcurementRule, self)._get_stock_move_values( - product_id, product_qty, product_uom, location_id, name, origin, - values, group_id) + result = super(StockRule, self)._get_stock_move_values( + product_id, product_qty, product_uom, + location_id, name, origin, values, group_id) if values.get('stock_request_id', False): result['allocation_ids'] = [(0, 0, { - 'stock_request_id': values['stock_request_id'], + 'stock_request_id': values.get('stock_request_id'), 'requested_product_uom_qty': product_qty, })] return result diff --git a/stock_request/security/ir.model.access.csv b/stock_request/security/ir.model.access.csv index f0103005b..7dc4569a2 100644 --- a/stock_request/security/ir.model.access.csv +++ b/stock_request/security/ir.model.access.csv @@ -7,8 +7,11 @@ access_stock_request_allocation_manager,stock request allocation manager,model_s access_stock_request_allocation_stock_user,stock.request.allocation stock user,model_stock_request_allocation,stock.group_stock_user,1,0,0,0 access_stock_location_user,stock.location.user,stock.model_stock_location,group_stock_request_user,1,0,0,0 access_stock_location_request_manager,stock.location request manager,stock.model_stock_location,group_stock_request_manager,1,0,0,0 -access_procurement_rule_request_manager,procurement_rule request_manager,stock.model_procurement_rule,group_stock_request_manager,1,0,0,0 -access_procurement_rule,procurement.rule.flow,stock.model_procurement_rule,group_stock_request_user,1,0,0,0 -access_stock_request_order_user,stock request user,model_stock_request_order,stock_request.group_stock_request_user,1,1,1,0 -access_stock_request_order_manager,stock request manager,model_stock_request_order,stock_request.group_stock_request_manager,1,1,1,1 +access_stock_rule_request_manager,stock_rule_request_manager,stock.model_stock_rule,group_stock_request_manager,1,0,0,0 +access_stock_rule_user,stock_rule_user,stock.model_stock_rule,group_stock_request_user,1,0,0,0 +access_stock_request_order_user,stock request user,model_stock_request_order,group_stock_request_user,1,1,1,0 +access_stock_request_order_manager,stock request manager,model_stock_request_order,group_stock_request_manager,1,1,1,1 access_stock_request_user_warehouse,stock request user Warehouse,stock.model_stock_warehouse,group_stock_request_user,1,0,0,0 +access_stock_request_manager_warehouse,stock request manager Warehouse,stock.model_stock_warehouse,group_stock_request_manager,1,0,0,0 +access_stock_request_user_stock_move,stock request user stock move,stock.model_stock_move,group_stock_request_user,1,0,0,0 +access_stock_request_manager_stock_move,stock request manager stock move,stock.model_stock_move,group_stock_request_manager,1,0,0,0 diff --git a/stock_request/security/stock_request_security.xml b/stock_request/security/stock_request_security.xml index 827788eb5..4d5bc9ce3 100644 --- a/stock_request/security/stock_request_security.xml +++ b/stock_request/security/stock_request_security.xml @@ -15,7 +15,7 @@ Stock Request Manager - + @@ -112,6 +112,6 @@ - + diff --git a/stock_request/tests/test_stock_request.py b/stock_request/tests/test_stock_request.py index 352116eae..c7669db4e 100644 --- a/stock_request/tests/test_stock_request.py +++ b/stock_request/tests/test_stock_request.py @@ -4,9 +4,11 @@ from odoo.tests import common from odoo import fields, exceptions from collections import Counter +from datetime import datetime class TestStockRequest(common.TransactionCase): + def setUp(self): super(TestStockRequest, self).setUp() @@ -21,12 +23,13 @@ class TestStockRequest(common.TransactionCase): self.env.ref('stock_request.group_stock_request_manager') self.main_company = self.env.ref('base.main_company') self.warehouse = self.env.ref('stock.warehouse0') - self.categ_unit = self.env.ref('product.product_uom_categ_unit') + self.categ_unit = self.env.ref('uom.product_uom_categ_unit') self.virtual_loc = self.env.ref('stock.stock_location_customers') # common data self.company_2 = self.env['res.company'].create({ 'name': 'Comp2', + 'parent_id': self.main_company.id }) self.wh2 = self.env['stock.warehouse'].search( [('company_id', '=', self.company_2.id)], limit=1) @@ -68,19 +71,19 @@ class TestStockRequest(common.TransactionCase): 'sequence': 10, }) - self.uom_dozen = self.env['product.uom'].create({ + self.uom_dozen = self.env['uom.uom'].create({ 'name': 'Test-DozenA', 'category_id': self.categ_unit.id, 'factor_inv': 12, 'uom_type': 'bigger', 'rounding': 0.001}) - self.env['procurement.rule'].create({ + self.env['stock.rule'].create({ 'name': 'Transfer', 'route_id': self.route.id, 'location_src_id': self.ressuply_loc.id, 'location_id': self.warehouse.lot_stock_id.id, - 'action': 'move', + 'action': 'pull', 'picking_type_id': self.warehouse.int_type_id.id, 'procure_method': 'make_to_stock', 'warehouse_id': self.warehouse.id, @@ -88,12 +91,12 @@ class TestStockRequest(common.TransactionCase): 'propagate': 'False', }) - self.env['procurement.rule'].create({ + self.env['stock.rule'].create({ 'name': 'Transfer', 'route_id': self.route_2.id, 'location_src_id': self.ressuply_loc_2.id, 'location_id': self.wh2.lot_stock_id.id, - 'action': 'move', + 'action': 'pull', 'picking_type_id': self.wh2.int_type_id.id, 'procure_method': 'make_to_stock', 'warehouse_id': self.wh2.id, @@ -116,7 +119,7 @@ class TestStockRequest(common.TransactionCase): return self.env['product.product'].create(dict( name=name, default_code=default_code, - uom_id=self.env.ref('product.product_uom_unit').id, + uom_id=self.env.ref('uom.product_uom_unit').id, company_id=company_id, type='product', **vals @@ -203,7 +206,7 @@ class TestStockRequest(common.TransactionCase): order.picking_policy, order.stock_request_ids.picking_policy) - order.expected_date = fields.Date.today() + order.expected_date = datetime.now() order.onchange_expected_date() self.assertEqual( order.expected_date, @@ -241,8 +244,8 @@ class TestStockRequest(common.TransactionCase): product = self.env['product.product'].create({ 'name': 'Wheat', - 'uom_id': self.env.ref('product.product_uom_kgm').id, - 'uom_po_id': self.env.ref('product.product_uom_kgm').id, + 'uom_id': self.env.ref('uom.product_uom_kgm').id, + 'uom_po_id': self.env.ref('uom.product_uom_kgm').id, }) # Test onchange_product_id @@ -254,7 +257,7 @@ class TestStockRequest(common.TransactionCase): product.uom_id.category_id.id)]) self.assertEqual( stock_request.product_uom_id, - self.env.ref('product.product_uom_kgm')) + self.env.ref('uom.product_uom_kgm')) stock_request.product_id = self.env['product.product'] res = stock_request.onchange_product_id() @@ -394,7 +397,7 @@ class TestStockRequest(common.TransactionCase): 'product_id': self.product.id, 'product_uom_id': self.product.uom_id.id, 'product_uom_qty': 5.0, - 'company_id': self.main_company.id, + 'company_id': self.company_2.id, 'warehouse_id': self.warehouse.id, 'location_id': self.warehouse.lot_stock_id.id, 'expected_date': expected_date, @@ -454,7 +457,7 @@ class TestStockRequest(common.TransactionCase): def test_stock_request_validations_01(self): vals = { 'product_id': self.product.id, - 'product_uom_id': self.env.ref('product.product_uom_kgm').id, + 'product_uom_id': self.env.ref('uom.product_uom_kgm').id, 'product_uom_qty': 5.0, 'company_id': self.main_company.id, 'warehouse_id': self.warehouse.id, @@ -741,29 +744,29 @@ class TestStockRequest(common.TransactionCase): stock_request.route_id = self.route_2 def test_stock_request_order_from_products(self): - product_A1 = self._create_product('CODEA1', 'Product A1', + product_a1 = self._create_product('CODEA1', 'Product A1', self.main_company.id) - template_A = product_A1.product_tmpl_id - product_A2 = self._create_product( + template_a = product_a1.product_tmpl_id + product_a2 = self._create_product( 'CODEA2', 'Product A2', self.main_company.id, - product_tmpl_id=template_A.id) - product_A3 = self._create_product( + product_tmpl_id=template_a.id) + product_a3 = self._create_product( 'CODEA3', 'Product A3', self.main_company.id, - product_tmpl_id=template_A.id) - product_B1 = self._create_product('CODEB1', 'Product B1', + product_tmpl_id=template_a.id) + product_b1 = self._create_product('CODEB1', 'Product B1', self.main_company.id) - template_B = product_B1.product_tmpl_id + template_b = product_b1.product_tmpl_id # One archived variant of B self._create_product( 'CODEB2', 'Product B2', self.main_company.id, - product_tmpl_id=template_B.id, active=False) - Order = self.request_order + product_tmpl_id=template_b.id, active=False) + order = self.request_order # Selecting some variants and creating an order - preexisting = Order.search([]) - wanted_products = product_A1 + product_A2 + product_B1 - action = Order._create_from_product_multiselect(wanted_products) - new_order = Order.search([]) - preexisting + preexisting = order.search([]) + wanted_products = product_a1 + product_a2 + product_b1 + action = order._create_from_product_multiselect(wanted_products) + new_order = order.search([]) - preexisting self.assertEqual(len(new_order), 1) self.assertEqual(action['res_id'], new_order.id, msg="Returned action references the wrong record") @@ -774,28 +777,28 @@ class TestStockRequest(common.TransactionCase): ) # Selecting a template and creating an order - preexisting = Order.search([]) - action = Order._create_from_product_multiselect(template_A) - new_order = Order.search([]) - preexisting + preexisting = order.search([]) + action = order._create_from_product_multiselect(template_a) + new_order = order.search([]) - preexisting self.assertEqual(len(new_order), 1) self.assertEqual(action['res_id'], new_order.id, msg="Returned action references the wrong record") self.assertEqual( - Counter(product_A1 + product_A2 + product_A3), + Counter(product_a1 + product_a2 + product_a3), Counter(new_order.stock_request_ids.mapped('product_id')), msg="Not all of the template's variants were ordered" ) # Selecting a template - preexisting = Order.search([]) - action = Order._create_from_product_multiselect( - template_A + template_B) - new_order = Order.search([]) - preexisting + preexisting = order.search([]) + action = order._create_from_product_multiselect( + template_a + template_b) + new_order = order.search([]) - preexisting self.assertEqual(len(new_order), 1) self.assertEqual(action['res_id'], new_order.id, msg="Returned action references the wrong record") self.assertEqual( - Counter(product_A1 + product_A2 + product_A3 + product_B1), + Counter(product_a1 + product_a2 + product_a3 + product_b1), Counter(new_order.stock_request_ids.mapped('product_id')), msg="Inactive variant was ordered though it shouldn't have been" ) @@ -809,17 +812,17 @@ class TestStockRequest(common.TransactionCase): "Unfortunately it seems you do not have the necessary rights " "for creating stock requests. Please contact your " "administrator."): - Order.sudo( + order.sudo( self.stock_request_user - )._create_from_product_multiselect(template_A + template_B) + )._create_from_product_multiselect(template_a + template_b) # Empty recordsets should just return False - self.assertFalse(Order._create_from_product_multiselect( + self.assertFalse(order._create_from_product_multiselect( self.env['product.product'])) # Wrong model should just raise ValidationError with self.assertRaises(exceptions.ValidationError): - Order._create_from_product_multiselect(self.stock_request_user) + order._create_from_product_multiselect(self.stock_request_user) def test_allow_virtual_location(self): self.main_company.stock_request_allow_virtual_loc = True diff --git a/stock_request/views/res_config_settings_views.xml b/stock_request/views/res_config_settings_views.xml index 93c422ff0..748d9001d 100644 --- a/stock_request/views/res_config_settings_views.xml +++ b/stock_request/views/res_config_settings_views.xml @@ -32,7 +32,7 @@
- +
-
-
+ + +