@@ -2528,6 +2528,24 @@ msgstr ""
|
||||
msgid "Internal reference number in case it differs from the manufacturer's lot/serial number"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/models/product.py:257
|
||||
#, python-format
|
||||
msgid "Invalid domain left operand %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/models/product.py:259
|
||||
#, python-format
|
||||
msgid "Invalid domain operator %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: code:addons/stock/models/product.py:261
|
||||
#, python-format
|
||||
msgid "Invalid domain right operand %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
#: model:ir.model.fields,field_description:stock.field_stock_inventory_category_id
|
||||
msgid "Inventoried Category"
|
||||
|
||||
@@ -254,11 +254,11 @@ class Product(models.Model):
|
||||
# TDE FIXME: should probably clean the search methods
|
||||
# to prevent sql injections
|
||||
if field not in ('qty_available', 'virtual_available', 'incoming_qty', 'outgoing_qty'):
|
||||
raise UserError('Invalid domain left operand')
|
||||
raise UserError(_('Invalid domain left operand %s') % field)
|
||||
if operator not in ('<', '>', '=', '!=', '<=', '>='):
|
||||
raise UserError('Invalid domain operator')
|
||||
raise UserError(_('Invalid domain operator %s') % operator)
|
||||
if not isinstance(value, (float, int)):
|
||||
raise UserError('Invalid domain right operand')
|
||||
raise UserError(_('Invalid domain right operand %s') % value)
|
||||
|
||||
# TODO: Still optimization possible when searching virtual quantities
|
||||
ids = []
|
||||
|
||||
Reference in New Issue
Block a user