Commit 64f59bcf authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_catalog: Sort values for multiple_selection type properties in catalog while editing

parent 8d177629
...@@ -234,6 +234,57 @@ class ERP5Catalog(Folder, Catalog): ...@@ -234,6 +234,57 @@ class ERP5Catalog(Folder, Catalog):
return md.get('type', 'string') return md.get('type', 'string')
return None return None
##### Overriding setters functions for multple_selection properties #######
##### Required as after every edit we expect the values sorted #######
def _setSqlClearCatalogList(self, value, **kw):
value = sorted(value)
self._baseSetSqlClearCatalogList(value, **kw)
def _setSqlCatalogFullTextSearchKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogFullTextSearchKeysList(value, **kw)
def _setSqlCatalogObjectListList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogObjectListList(value, **kw)
def _setSqlUncatalogObjectList(self, value, **kw):
value = sorted(value)
self._baseSetSqlUncatalogObjectList(value, **kw)
def _setSqlSearchTablesList(self, value, **kw):
value = sorted(value)
self._baseSetSqlSearchTablesList(value, **kw)
def _setSqlCatalogDatetimeSearchKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogDatetimeSearchKeysList(value, **kw)
def _setSqlCatalogKeywordSearchKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogKeywordSearchKeysList(value, **kw)
def _setSqlCatalogMultivalueKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogMultivalueKeysList(value, **kw)
def _setSqlCatalogRequestKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogRequestKeysList(value, **kw)
def _setSqlCatalogIndexOnOrderKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogIndexOnOrderKeysList(value, **kw)
def _setSqlCatalogTableVoteScriptsList(self, value, **kw):
value = sorted(value)
self._baseSetSqlCatalogTableVoteScriptsList(value, **kw)
def _setSqlSearchResultKeysList(self, value, **kw):
value = sorted(value)
self._baseSetSqlSearchResultKeysList(value, **kw)
security.declarePublic('getCatalogMethodIds') security.declarePublic('getCatalogMethodIds')
def getCatalogMethodIds(self, def getCatalogMethodIds(self,
valid_method_meta_type_list=valid_method_meta_type_list_new): valid_method_meta_type_list=valid_method_meta_type_list_new):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment