Commit fd94feda authored by Douglas's avatar Douglas

erp5_wendelin_configurator: bt5 migrated to new format

parent 237cc8b3
"""
This script will be called to apply the customization.
"""
# Ivan: we simply do nothing for now
......@@ -48,15 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>""" \n
This script will be called to apply the customization. \n
"""\n
\n
# Ivan: we simply do nothing for now\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>alter_preferences=True</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
context.setGlobalConfigurationAttr(
categories_spreadsheet_configuration_save_relative_url=configuration_save.getRelativeUrl())
configuration_save.addConfigurationItem("Categories Spreadsheet Configurator Item",
configuration_spreadsheet_file=configuration_spreadsheet)
# l10n
user_preferred_language = kw.get('user_preferred_language')
if user_preferred_language not in ('en', None):
# english is default lang anyway
bt5_name = 'erp5_l10n_%s' %user_preferred_language
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
title=bt5_name,
bt5_id=bt5_name,
update_catalog=False,
install_dependency=True)
......@@ -48,27 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
context.setGlobalConfigurationAttr(\n
categories_spreadsheet_configuration_save_relative_url=configuration_save.getRelativeUrl())\n
\n
configuration_save.addConfigurationItem("Categories Spreadsheet Configurator Item",\n
configuration_spreadsheet_file=configuration_spreadsheet)\n
# l10n\n
user_preferred_language = kw.get(\'user_preferred_language\')\n
if user_preferred_language not in (\'en\', None):\n
# english is default lang anyway\n
bt5_name = \'erp5_l10n_%s\' %user_preferred_language\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=bt5_name, \n
bt5_id=bt5_name,\n
update_catalog=False,\n
install_dependency=True)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url, configuration_spreadsheet, **kw</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
company_email = kw['default_email_text']
group = kw['group']
organisation_configurator_item = configuration_save.addConfigurationItem(
"Organisation Configurator Item", **kw)
# store globally preferred group
context.setGlobalConfigurationAttr(group_id=group)
# store globally company's email
context.setGlobalConfigurationAttr(company_email=company_email)
# store globally company's configurator item which we can use later to reconfigure
context.setGlobalConfigurationAttr(organisation_configurator_item=organisation_configurator_item.getRelativeUrl())
# price currency contains all currency info like iso code& precision ';' separated
currency_info_list = kw['price_currency_list']
for currency_info in currency_info_list:
currency_reference, currency_base_unit_quantity, currency_title = \
currency_info.split(';')
configuration_save.addConfigurationItem(
"Currency Configurator Item",
reference = currency_reference,
base_unit_quantity = currency_base_unit_quantity,
title = currency_title,)
context.setGlobalConfigurationAttr(default_currency=currency_reference)
......@@ -48,41 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
configuration_save = context.restrictedTraverse(configuration_save_url)\n
company_email = kw[\'default_email_text\']\n
group = kw[\'group\']\n
\n
organisation_configurator_item = configuration_save.addConfigurationItem(\n
"Organisation Configurator Item", **kw)\n
\n
# store globally preferred group\n
context.setGlobalConfigurationAttr(group_id=group)\n
\n
# store globally company\'s email\n
context.setGlobalConfigurationAttr(company_email=company_email)\n
\n
# store globally company\'s configurator item which we can use later to reconfigure\n
context.setGlobalConfigurationAttr(organisation_configurator_item=organisation_configurator_item.getRelativeUrl())\n
\n
# price currency contains all currency info like iso code& precision \';\' separated\n
currency_info_list = kw[\'price_currency_list\']\n
for currency_info in currency_info_list:\n
currency_reference, currency_base_unit_quantity, currency_title = \\\n
currency_info.split(\';\')\n
configuration_save.addConfigurationItem(\n
"Currency Configurator Item",\n
reference = currency_reference,\n
base_unit_quantity = currency_base_unit_quantity,\n
title = currency_title,)\n
context.setGlobalConfigurationAttr(default_currency=currency_reference)\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value>
......
l = context.BusinessConfiguration_getCategoriesSpreadsheetConfiguratorItem().getCategoryTitleItemList(category_id)
l.sort()
return l
......@@ -48,13 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>l = context.BusinessConfiguration_getCategoriesSpreadsheetConfiguratorItem().getCategoryTitleItemList(category_id)\n
l.sort()\n
return l\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>category_id</string> </value>
......
configuration_save = context.restrictedTraverse(configuration_save_url)
bt5_installation_list = ('erp5_full_text_mroonga_catalog',
'erp5_base',
'erp5_jquery_ui',
'erp5_ingestion_mysql_innodb_catalog',
'erp5_ingestion',
'erp5_stock_cache',
'erp5_web',
'erp5_dms',
'erp5_pdm',
'erp5_knowledge_pad',
'erp5_trade',
'erp5_project',
'erp5_simulation',
'erp5_ods_style',
'erp5_odt_style',
'erp5_rss_style',
'erp5_trade',
# to develop faster
'erp5_ace_editor',
'erp5_forge',
'erp5_development_wizard',
'erp5_dhtml_style',
# install later UI bt5s as broken now
#'erp5_wendelin_renderjs_ui',
'erp5_hal_json_style',
'erp5_web_renderjs_ui',
'erp5_wendelin',
'erp5_wendelin_examples',
'erp5_wendelin_data',
'erp5_wendelin_development'
)
bt5_update_catalog = ('erp5_ingestion_mysql_innodb_catalog',)
for name in bt5_installation_list:
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",
title=name, bt5_id=name,
update_catalog=(name in bt5_update_catalog),
install_dependency=True,
)
......@@ -48,54 +48,6 @@
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>configuration_save = context.restrictedTraverse(configuration_save_url)\n
\n
bt5_installation_list = (\'erp5_full_text_mroonga_catalog\',\n
\'erp5_base\',\n
\'erp5_jquery_ui\',\n
\'erp5_ingestion_mysql_innodb_catalog\',\n
\'erp5_ingestion\',\n
\'erp5_stock_cache\',\n
\'erp5_knowledge_pad\', # it must be before erp5_web\n
\'erp5_web\',\n
\'erp5_dms\',\n
\'erp5_pdm\',\n
\'erp5_trade\',\n
\'erp5_project\',\n
\'erp5_simulation\',\n
\'erp5_ods_style\',\n
\'erp5_odt_style\',\n
\'erp5_rss_style\',\n
\'erp5_trade\',\n
# jupiter notebook integration\n
\'erp5_data_notebook\',\n
# to develop faster\n
\'erp5_ace_editor\',\n
\'erp5_forge\',\n
\'erp5_development_wizard\',\n
\'erp5_dhtml_style\',\n
# install later UI bt5s as broken now\n
#\'erp5_wendelin_renderjs_ui\',\n
\'erp5_hal_json_style\',\n
\'erp5_web_renderjs_ui\',\n
\'erp5_wendelin\',\n
\'erp5_wendelin_examples\',\n
\'erp5_wendelin_data\',\n
\'erp5_wendelin_development\'\n
)\n
\n
bt5_update_catalog = (\'erp5_ingestion_mysql_innodb_catalog\',)\n
\n
for name in bt5_installation_list:\n
configuration_save.addConfigurationItem("Standard BT5 Configurator Item",\n
title=name, bt5_id=name,\n
update_catalog=(name in bt5_update_catalog),\n
install_dependency=True,\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>configuration_save_url=None, **kw</string> </value>
......
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