[FIX] stock: warning on move

The warning should be a dictionary, not a string.

opw-781880
This commit is contained in:
Nicolas Martinelli
2017-11-15 14:08:42 +01:00
parent 4dc670bc81
commit 0fe7989e24
2 changed files with 44 additions and 3 deletions
+37
View File
@@ -2711,6 +2711,11 @@ msgstr ""
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
@@ -3004,6 +3009,11 @@ msgstr ""
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"
@@ -4597,6 +4607,11 @@ msgstr ""
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"
@@ -4619,6 +4634,17 @@ msgstr ""
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"
@@ -5122,6 +5148,11 @@ msgstr ""
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"
@@ -5695,6 +5726,12 @@ msgstr ""
msgid "The parent location that includes this location. Example : The 'Dispatch Zone' is the 'Gate 1' parent location."
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"
+7 -3
View File
@@ -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):