Commit e5da7171 authored by Ayush Tiwari's avatar Ayush Tiwari

erp5_multiple_selection_conflict: Remove '_'(underscore) from...

erp5_multiple_selection_conflict: Remove '_'(underscore) from 'multiple_selection' subcategory in elmentary_type category.

Subcategory 'multiple_selection' has been renamed to 'multiple selection' to maintain consistency.
Earlier, whenever a new StandardCategory object was created with property_type 'multiple selection',
one needed to change the elementary type explicilty to use it to generate property setters and getters.
The example for this can be seen from this commit:
fd738753
After this change, in the view, property type field couldn't recognize the property and displays
(???multiple selection).

Also, everywhere in erp5, list_types do mention 'multiple selction' and not 'multiple_selection'.
So, its better to maintain consistency in naming the subcategory.
parent 12a22d07
......@@ -12,7 +12,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>multiple_selection</string> </value>
<value> <string>multiple selection</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......
......@@ -66,7 +66,7 @@ class PreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
list_prefix = ''
if prop.getProperty('multivalued') or (
prop.getProperty('elementary_type') in (
'lines', 'multiple_selection', 'tokens')):
'lines', 'multiple selection', 'tokens')):
list_prefix = '_list'
property_id_list.append('%s%s' % (prop.getReference(), list_prefix))
return property_id_list
......
......@@ -67,7 +67,7 @@ class SystemPreferenceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
list_prefix = ''
if prop.getProperty('multivalued') or (
prop.getProperty('elementary_type') in (
'lines', 'multiple_selection', 'tokens')):
'lines', 'multiple selection', 'tokens')):
list_prefix = '_list'
property_id_list.append('%s%s' % (prop.getReference(), list_prefix))
return property_id_list
......
  • Hey @gabriel , I found out you made this change(fd738753) to solve the accessor problem. Please have a look at this commit I made to solve this. Thanks beforehand.

    Edited by Ayush Tiwari
  • @tiwariayush, Do you know if there is a test for it? If tests are passing, please go ahead.

    And Thank you to solve it.

  • @gabriel, yeah I have created test suite regarding this. Will put it up for merge when it passes. Thanks

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