[IMP] base: specify which order is invalid

Before this commit knowing which _order option was having issues may
be non-obvious.
This changes makes it a bit more obvious.

closes odoo/odoo#54703

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
root
2020-07-23 08:58:48 +00:00
committed by Martin Trigaux
parent c6d5948c75
commit e3f68b9ba8
+4 -1
View File
@@ -4148,7 +4148,10 @@ Record ids: %(records)s
def _check_qorder(self, word):
if not regex_order.match(word):
raise UserError(_('Invalid "order" specified. A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction)'))
raise UserError(_(
'Invalid "order" specified (%s). A valid "order" specification is a comma-separated list of valid field names (optionally followed by asc/desc for the direction)',
word,
))
return True
@api.model