diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.py b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.py new file mode 100644 index 0000000000000000000000000000000000000000..2ce756dd7a35d6d0e79acd7dd7c465445c9e9732 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.py @@ -0,0 +1,13 @@ +portal = context.getPortalObject() +integration_site = portal.restrictedTraverse(portal.portal_preferences.getPreferredPayzenIntegrationSite()) + +now = DateTime().toZone('UTC') +today = now.asdatetime().strftime('%Y%m%d') + +increment_list = [] +for _ in range(int(increment)): + increment_list.append(str(portal.portal_ids.generateNewId( + id_group='%s_%s' % (integration_site.getRelativeUrl(), today), + id_generator='uid')).zfill(6)) + +return increment_list diff --git a/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.xml b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.xml new file mode 100644 index 0000000000000000000000000000000000000000..08aa427a17077bc9d5cecc02c55aca3da916f9b0 --- /dev/null +++ b/master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/ERP5Site_increasePayzenTransactionId.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <item> + <key> <string>_bind_names</string> </key> + <value> + <object> + <klass> + <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>_asgns</string> </key> + <value> + <dictionary> + <item> + <key> <string>name_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <item> + <key> <string>name_subpath</string> </key> + <value> <string>traverse_subpath</string> </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string>increment=1</string> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ERP5Site_increasePayzenTransactionId</string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData>