mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[MIG] stock_request v12
This commit is contained in:
@@ -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 <atte.isopuro@avoin.systems>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
* Raul Martin <raul.martin@braintec-group.com>
|
||||
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
@@ -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, "
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
<odoo noupdate="1">
|
||||
|
||||
<record id="seq_stock_request" model="ir.sequence">
|
||||
<field name="name">Stock Request</field>
|
||||
<field name="code">stock.request</field>
|
||||
<field name="prefix">SR/</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
<record id="seq_stock_request" model="ir.sequence">
|
||||
<field name="name">Stock Request</field>
|
||||
<field name="code">stock.request</field>
|
||||
<field name="prefix">SR/</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="seq_stock_request_order" model="ir.sequence">
|
||||
<field name="name">Stock Request Order</field>
|
||||
<field name="code">stock.request.order</field>
|
||||
<field name="prefix">SRO/</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
<record id="seq_stock_request_order" model="ir.sequence">
|
||||
<field name="name">Stock Request Order</field>
|
||||
<field name="code">stock.request.order</field>
|
||||
<field name="prefix">SRO/</field>
|
||||
<field name="padding">5</field>
|
||||
<field name="company_id" eval="False"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
@@ -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([
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
<record id="group_stock_request_manager" model="res.groups">
|
||||
<field name="name">Stock Request Manager</field>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>
|
||||
<field name="implied_ids"
|
||||
eval="[(4, ref('stock_request.group_stock_request_user'))]"/>
|
||||
<field name="category_id" ref="module_category_stock_request"/>
|
||||
@@ -112,6 +112,6 @@
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="stock_request_allow_virtual_loc"/>
|
||||
<field name="stock_request_allow_virtual_loc" readonly="0"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Allow All Locations Types" for="stock_request_allow_virtual_loc"/>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="requested_product_uom_qty"/>
|
||||
<field name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="requested_product_qty"/>
|
||||
<field name="allocated_product_qty"/>
|
||||
<field name="open_product_qty" />
|
||||
@@ -38,7 +38,7 @@
|
||||
<field name="requested_product_uom_qty"/>
|
||||
<field name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="product.group_uom"/>
|
||||
groups="uom.group_uom"/>
|
||||
<field name="requested_product_qty"/>
|
||||
<field name="allocated_product_qty"/>
|
||||
<field name="open_product_qty" />
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label string="Stock Request"/>
|
||||
<label for="name" string="Stock Request"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
@@ -94,7 +94,7 @@
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="product.group_uom"/>
|
||||
groups="uom.group_uom"/>
|
||||
<field name="route_id"
|
||||
options="{'no_create': True}"
|
||||
groups="stock.group_stock_multi_locations"/>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<field name="route_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>
|
||||
<field name="product_id"/>
|
||||
<field name="product_uom_id"
|
||||
options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
|
||||
options="{'no_open': True, 'no_create': True}" groups="uom.group_uom"/>
|
||||
<field name="product_uom_qty"/>
|
||||
<field name="qty_in_progress" />
|
||||
<field name="qty_done" />
|
||||
@@ -37,8 +37,8 @@
|
||||
<field name="product_id"/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
|
||||
<filter string="Location" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
<filter name="warehouse" string="Warehouse" domain="[]" context="{'group_by':'warehouse_id'}"/>
|
||||
<filter name="location" string="Location" domain="[]" context="{'group_by':'location_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -76,7 +76,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label string="Stock Request " />
|
||||
<label for="name" string="Stock Request"/>
|
||||
<h1>
|
||||
<field name="name" readonly="1"/>
|
||||
</h1>
|
||||
@@ -107,12 +107,15 @@
|
||||
<field name="product_uom_id"
|
||||
class="oe_inline"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
groups="product.group_uom"/>
|
||||
groups="uom.group_uom"/>
|
||||
</div>
|
||||
<field name="qty_in_progress" />
|
||||
<field name="qty_done" />
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<!--Empty notebook to inherit pages from other related modules-->
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
|
||||
Reference in New Issue
Block a user