diff --git a/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareLicence.py b/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareLicence.py index 147abb150331a7c54399a1b6499a90a60e924647..3590e27ae993b52ab8ac6f50781a14d73109b728 100644 --- a/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareLicence.py +++ b/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareLicence.py @@ -43,19 +43,3 @@ class SoftwareLicence(TextDocument, Item): # Declarative security security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) - - def getSearchableText(self): - """Text for full text search""" - text_list = [] - for prop in ( self.getTitle(), - self.getDescription(), - self.getShortTitle(), - ): - if prop: - text_list.append(str(prop)) - for subject in self.getSubjectList(): - text_list.append(str(subject)) - - return ' '.join(text_list) - - SearchableText = getSearchableText diff --git a/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareProduct.py b/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareProduct.py index eeedb59746b4a7d0b34166a4155f30b7e5e524a1..56171d385ac121a861f41b440706f622319405f0 100644 --- a/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareProduct.py +++ b/bt5/erp5_software_pdm/DocumentTemplateItem/SoftwareProduct.py @@ -55,19 +55,3 @@ class SoftwareProduct(Resource): # content_type property is also a method from PortalFolder, so we need a # valid type by default. content_type = '' - - security.declareProtected(Permissions.AccessContentsInformation, - 'SearchableText') - def SearchableText(self): - """Text for full text search""" - text_list = [] - for prop in ( self.getTitle(), - self.getDescription(), - self.getUrlString(), - ): - if prop: - text_list.append(str(prop)) - for subject in self.getSubjectList(): - text_list.append(str(subject)) - - return ' '.join(text_list) diff --git a/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Licence.xml b/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Licence.xml index 92992a3fd109fa0716eeca48a888149e62603793..caff0ef4e80dc0842bf23d36b4dd6dd79b746858 100644 --- a/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Licence.xml +++ b/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Licence.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/> - <tuple/> - </tuple> + <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/> </pickle> <pickle> <dictionary> @@ -78,15 +75,23 @@ <key> <string>product</string> </key> <value> <string>ERP5Type</string> </value> </item> + <item> + <key> <string>searchable_text_property_id</string> </key> + <value> + <tuple> + <string>title</string> + <string>description</string> + <string>short_title</string> + <string>subject_list</string> + </tuple> + </value> + </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> - <tuple> - <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> - <tuple/> - </tuple> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> </pickle> <pickle> <dictionary> @@ -103,10 +108,7 @@ </record> <record id="3" aka="AAAAAAAAAAM="> <pickle> - <tuple> - <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> - <tuple/> - </tuple> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> </pickle> <pickle> <dictionary> diff --git a/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Product.xml b/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Product.xml index e273e022f0ab599283977560ad152cbf9a116393..9881d0e674862c09e24a852a86c6497c63fa8c61 100644 --- a/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Product.xml +++ b/bt5/erp5_software_pdm/PortalTypeTemplateItem/portal_types/Software%20Product.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/> - <tuple/> - </tuple> + <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/> </pickle> <pickle> <dictionary> @@ -92,15 +89,23 @@ <key> <string>product</string> </key> <value> <string>ERP5Type</string> </value> </item> + <item> + <key> <string>searchable_text_property_id</string> </key> + <value> + <tuple> + <string>title</string> + <string>description</string> + <string>url_string</string> + <string>subject_list</string> + </tuple> + </value> + </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> - <tuple> - <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> - <tuple/> - </tuple> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> </pickle> <pickle> <dictionary> @@ -117,10 +122,7 @@ </record> <record id="3" aka="AAAAAAAAAAM="> <pickle> - <tuple> - <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> - <tuple/> - </tuple> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> </pickle> <pickle> <dictionary> @@ -137,10 +139,7 @@ </record> <record id="4" aka="AAAAAAAAAAQ="> <pickle> - <tuple> - <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> - <tuple/> - </tuple> + <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/> </pickle> <pickle> <dictionary> diff --git a/bt5/erp5_software_pdm/bt/revision b/bt5/erp5_software_pdm/bt/revision index d1cbcfa54043559204a5b30b0d1b808dfe9cb552..832332893ab752cd7a530a0d45c00fdf2f436453 100644 --- a/bt5/erp5_software_pdm/bt/revision +++ b/bt5/erp5_software_pdm/bt/revision @@ -1 +1 @@ -66 \ No newline at end of file +67 \ No newline at end of file