summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2019-11-14 14:56:45 +0000
committerLucas Perais (lpe) <lpe@odoo.com>2020-03-04 16:26:07 +0000
commit8c8f328e290c83c1e00d43636fb9b8620979f6cd (patch)
tree76e9c93ddee33b4b841f986861c0f21ccd2f48a2 /odoo/fields.py
parent92bd23746b2e3fe5a7b7e5dd0b5ed0061d58fcd8 (diff)
[FIX] orm: fields x2m are not sortable
Before this commit, x2m fields were described as 'sortable' This was odd since: - When actually sorting on one of those fields through the webclient the sorting was gibbrish - Even the orm silently warned in the log that the field was not a sql column and therefore was not sortable After this commit, only a field which is column (and a few other conditions) can be sorted Task 1863492 closes odoo/odoo#46921 X-original-commit: dd3094378fc322447d1aef994f6bace3f0c24288 Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index d75923db841..18e013aa83e 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -715,7 +715,7 @@ class Field(MetaField('DummyField', (object,), {})):
@property
def _description_sortable(self):
- return self.store or (self.inherited and self.related_field._description_sortable)
+ return (self.column_type and self.store) or (self.inherited and self.related_field._description_sortable)
def _description_string(self, env):
if self.string and env.lang: