[gen] Ref field: added a confirmation popup when the user wants to sort the ref. Indeed, most users think it is like sorting query results: they are not conscious it is a permanent change in the database, with effect for all users.

This commit is contained in:
Gaetan Delannay 2014-10-07 15:03:07 +02:00
parent c2676c9cf8
commit a16871f4b5
11 changed files with 57 additions and 17 deletions

View file

@ -328,8 +328,9 @@ class Field:
return self.indexed and not self.isMultiValued() and not \
((self.type == 'String') and self.isSelection())
elif usage == 'ref':
return self.type in ('Integer', 'Float', 'Boolean', 'Date') or \
((self.type == 'String') and (self.format == 0))
if self.type in ('Integer', 'Float', 'Boolean', 'Date'): return True
elif self.type == 'String':
return (self.format == 0) and not self.isMultilingual(None,True)
def isShowable(self, obj, layoutType):
'''When displaying p_obj on a given p_layoutType, must we show this