[FIX] sale_stock: UoM in warning
The warning message of the product packaging change does not take into account the appropriate UoM. opw-12827 Fixes #12827
This commit is contained in:
parent
8ceb9438d1
commit
f57f55966d
|
@ -349,7 +349,7 @@ msgstr ""
|
||||||
#. module: sale_stock
|
#. module: sale_stock
|
||||||
#: code:addons/sale_stock/sale_stock.py:270
|
#: code:addons/sale_stock/sale_stock.py:270
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "You selected a quantity of %d Units.\n"
|
msgid "You selected a quantity of %s %s.\n"
|
||||||
"But it's not compatible with the selected packaging.\n"
|
"But it's not compatible with the selected packaging.\n"
|
||||||
"Here is a proposition of quantities according to the packaging:\n"
|
"Here is a proposition of quantities according to the packaging:\n"
|
||||||
"EAN: %s Quantity: %s Type of ul: %s"
|
"EAN: %s Quantity: %s Type of ul: %s"
|
||||||
|
|
|
@ -260,11 +260,12 @@ class sale_order_line(osv.osv):
|
||||||
qty_pack = pack.qty
|
qty_pack = pack.qty
|
||||||
type_ul = pack.ul
|
type_ul = pack.ul
|
||||||
if not warning_msgs:
|
if not warning_msgs:
|
||||||
warn_msg = _("You selected a quantity of %d Units.\n"
|
uom_obj = product_uom_obj.browse(cr, uid, uom, context=context)
|
||||||
|
warn_msg = _("You selected a quantity of %s %s.\n"
|
||||||
"But it's not compatible with the selected packaging.\n"
|
"But it's not compatible with the selected packaging.\n"
|
||||||
"Here is a proposition of quantities according to the packaging:\n"
|
"Here is a proposition of quantities according to the packaging:\n"
|
||||||
"EAN: %s Quantity: %s Type of ul: %s") % \
|
"EAN: %s Quantity: %s Type of ul: %s") % \
|
||||||
(qty, ean, qty_pack, type_ul.name)
|
(qty, uom_obj.name, ean, qty_pack, type_ul.name)
|
||||||
warning_msgs += _("Picking Information ! : ") + warn_msg + "\n\n"
|
warning_msgs += _("Picking Information ! : ") + warn_msg + "\n\n"
|
||||||
warning = {
|
warning = {
|
||||||
'title': _('Configuration Error!'),
|
'title': _('Configuration Error!'),
|
||||||
|
|
Loading…
Reference in New Issue