From 10869faf8ff1ac88e62841015d4efb09f028f8d8 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Thu, 15 Dec 2016 09:47:50 +0100 Subject: [PATCH] Fix SQL query when sorting inherited product fields Some inherited fields are not directly stored in the database, such field use a custom SQL order. When sorting from product, we must reuse the same custom SQL order. issue5318 review30861002 --- product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product.py b/product.py index 79634c183a..8a96f7f77a 100644 --- a/product.py +++ b/product.py @@ -164,7 +164,8 @@ class TemplateFunction(fields.Function): } else: template = tables['template'] - return [Column(template, name)] + return getattr(Template, name).convert_order( + name, tables['template'], Template) return order