Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions addons/stock/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -2836,13 +2836,10 @@ msgstr ""
"No es posible reservar más productos que los %s que tiene en existencias."

#. module: stock
#: code:addons/stock/models/stock_quant.py:266
#: code:addons/stock/models/stock_quant.py:273
#, python-format
msgid ""
"It is not possible to unreserve more products of %s than you have in stock."
msgstr ""
"No es posible deshacer la reserva de más productos que los %s que tiene en "
"existencias."
msgid "It is not possible to unreserve more products of %s than you have in stock. Available quantity: %s, quantity: %s"
msgstr "No es posible deshacer la reserva de más productos que los %s que tiene en existencias. Cantidad disponible: %s, cantidad: %s"

#. module: stock
#: model:ir.model.fields,help:stock.field_stock_move__product_packaging
Expand Down
4 changes: 3 additions & 1 deletion addons/stock/models/stock_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ def _update_reserved_quantity(self, product_id, location_id, quantity, lot_id=No
# if we want to unreserve
available_quantity = sum(quants.mapped('reserved_quantity'))
if float_compare(abs(quantity), available_quantity, precision_rounding=rounding) > 0:
raise UserError(_('It is not possible to unreserve more products of %s than you have in stock.') % product_id.display_name)
msg = _("It is not possible to unreserve more products of %s than you have in stock."
" Available quantity: %s, quantity: %s") % (product_id.display_name, available_quantity, quantity)
raise UserError(msg)
else:
return reserved_quants

Expand Down