summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2017-11-15 13:37:21 +0100
committerNicolas Martinelli <nim@odoo.com>2017-11-15 14:08:42 +0100
commit0fe7989e24fa4380c135fd7718991dfa4a66a101 (patch)
tree80c46a4aad8b99feebcb2ff7b48c10ac1193215c
parent4dc670bc811cc263182d1ae09860ca1e5251013e (diff)
[FIX] stock: warning on move
The warning should be a dictionary, not a string. opw-781880
-rw-r--r--addons/stock/i18n/stock.pot37
-rw-r--r--addons/stock/models/stock_move.py10
2 files changed, 44 insertions, 3 deletions
diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot
index 82dd7251a1d..d3a06ce060f 100644
--- a/addons/stock/i18n/stock.pot
+++ b/addons/stock/i18n/stock.pot
@@ -2712,6 +2712,11 @@ msgid "Inventory Line"
msgstr ""
#. module: stock
+#: model:ir.actions.act_window,name:stock.action_inventory_line_tree
+msgid "Inventory Lines"
+msgstr ""
+
+#. module: stock
#: model:ir.model.fields,field_description:stock.field_product_product_property_stock_inventory
#: model:ir.model.fields,field_description:stock.field_product_template_property_stock_inventory
msgid "Inventory Location"
@@ -3005,6 +3010,11 @@ msgid "Linked Quant"
msgstr ""
#. module: stock
+#: model:ir.ui.view,arch_db:stock.view_inventory_form
+msgid "List view of lines"
+msgstr ""
+
+#. module: stock
#: model:ir.ui.view,arch_db:stock.view_location_form
msgid "Localization"
msgstr ""
@@ -4598,6 +4608,11 @@ msgid "Quantity"
msgstr ""
#. module: stock
+#: model:ir.model.fields,field_description:stock.field_stock_pack_operation_qty_done_uom_ordered
+msgid "Quantity Done"
+msgstr ""
+
+#. module: stock
#: model:ir.ui.view,arch_db:stock.view_warehouse_orderpoint_form
msgid "Quantity Multiple"
msgstr ""
@@ -4620,6 +4635,17 @@ msgid "Quantity cannot be negative."
msgstr ""
#. module: stock
+#: code:addons/stock/models/stock_move.py:394
+#, python-format
+msgid "Quantity decreased!"
+msgstr ""
+
+#. module: stock
+#: model:ir.model.fields,help:stock.field_stock_pack_operation_qty_done_uom_ordered
+msgid "Quantity done in UOM ordered"
+msgstr ""
+
+#. module: stock
#: model:ir.model.fields,help:stock.field_stock_move_availability
msgid "Quantity in stock that can still be reserved for this move"
msgstr ""
@@ -5123,6 +5149,11 @@ msgid "Search Inventory"
msgstr ""
#. module: stock
+#: model:ir.ui.view,arch_db:stock.stock_inventory_line_search
+msgid "Search Inventory Lines"
+msgstr ""
+
+#. module: stock
#: model:ir.ui.view,arch_db:stock.stock_scrap_search_view
msgid "Search Scrap"
msgstr ""
@@ -5696,6 +5727,12 @@ msgid "The parent location that includes this location. Example : The 'Dispatch
msgstr ""
#. module: stock
+#: code:addons/stock/models/stock_picking.py:795
+#, python-format
+msgid "The pick is already validated"
+msgstr ""
+
+#. module: stock
#: model:ir.model,name:stock.model_stock_picking_type
msgid "The picking type determines the picking view"
msgstr ""
diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py
index 3c359c93b25..26db3fa010f 100644
--- a/addons/stock/models/stock_move.py
+++ b/addons/stock/models/stock_move.py
@@ -390,9 +390,13 @@ class StockMove(models.Model):
if not self.product_id or self.product_qty < 0.0:
self.product_qty = 0.0
if self.product_qty < self._origin.product_qty:
- return {'warning': _("By changing this quantity here, you accept the "
- "new quantity as complete: Odoo will not "
- "automatically generate a back order.")}
+ warning_mess = {
+ 'title': _('Quantity decreased!'),
+ 'message' : _("By changing this quantity here, you accept the "
+ "new quantity as complete: Odoo will not "
+ "automatically generate a back order."),
+ }
+ return {'warning': warning_mess}
@api.onchange('product_id')
def onchange_product_id(self):