diff --git a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml index 44e41001194bf914a34cdf4d032aa8651ff3c5d5..113818f4cb294232d763c993fd196ef03249d152 100644 --- a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml +++ b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_getOpenSaleOrderDifference.xml @@ -81,7 +81,10 @@ now = DateTime()\n \n add_kw_kw = {}\n for (add_kw, explanation) in add_kw_list:\n - existing = portal.portal_catalog.countResults(portal_type=\'Open Sale Order Line\', default_aggregate_uid=portal.restrictedTraverse(add_kw[\'aggregate\']).getUid())[0][0] > 0\n + existing = portal.portal_catalog.countResults(\n + portal_type=\'Open Sale Order Line\',\n + default_aggregate_uid=portal.restrictedTraverse(add_kw[\'aggregate\']).getUid()\n + )[0][0] > 0\n if add_kw[\'aggregate\'] not in hosting_subscription_mapping and not existing:\n add_kw_kw[add_kw[\'aggregate\']] = add_kw.copy()\n add_kw_kw[add_kw[\'aggregate\']][\'explanation\'] = [\'Added because of %s \' % explanation]\n diff --git a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml index 4c27c63c776f8dc8308ba7af74f3987bf2a60a8f..c073fce34312f1f8900b6c316092fd4079073d75 100644 --- a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml +++ b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_storeOpenSaleOrderJournal.xml @@ -57,11 +57,15 @@ add_kw_list = []\n start_date_tuple_list = []\n \n def getWorkflowDate(document, action):\n - workflow_item_list = portal.portal_workflow.getInfoFor(ob=document, name=\'history\', wf_id=\'instance_slap_interface_workflow\')\n + workflow_item_list = portal.portal_workflow.getInfoFor(\n + ob=document,\n + name=\'history\',\n + wf_id=\'instance_slap_interface_workflow\')\n for item in workflow_item_list:\n if item.get(\'action\') == action:\n return item.get(\'time\')\n - raise ValueError(\'Document %s has no action %s\' % (document.getPath(), action))\n + raise ValueError(\'Document %s has no action %s\' % (document.getPath(),\n + action))\n \n for hosting_subscription in portal.portal_catalog(\n portal_type=\'Hosting Subscription\',\n @@ -74,15 +78,23 @@ for hosting_subscription in portal.portal_catalog(\n hosting_subscription = hosting_subscription.getObject()\n add_kw_list.append((add_kw, hosting_subscription.getPath()))\n if hosting_subscription.getSlapState() == \'destroy_requested\':\n - remove_hosting_list.append((hosting_subscription.getRelativeUrl(), hosting_subscription.getPath()))\n + remove_hosting_list.append((hosting_subscription.getRelativeUrl(),\n + hosting_subscription.getPath()))\n try:\n start_date = getWorkflowDate(hosting_subscription, \'request_instance\')\n except ValueError:\n start_date = hosting_subscription.getCreationDate()\n - start_date_tuple_list.append((hosting_subscription.getRelativeUrl(), start_date, hosting_subscription.getPath()))\n + start_date_tuple_list.append((hosting_subscription.getRelativeUrl(),\n + start_date,\n + hosting_subscription.getPath()))\n \n \n -result = context.Person_updateOpenSaleOrder(src__=src__, remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list, start_date_tuple_list=start_date_tuple_list, stop_date=stop_date)\n +result = context.Person_updateOpenSaleOrder(\n + src__=src__,\n + remove_hosting_list=remove_hosting_list,\n + add_kw_list=add_kw_list,\n + start_date_tuple_list=start_date_tuple_list,\n + stop_date=stop_date)\n from pprint import pformat\n return pformat(result)\n </string> </value> diff --git a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml index 28322b2ce6b867aa63a2a3122750d37e38bdbfab..1ff390cd88a2e1371e6ac1942a96ebbbebc29423 100644 --- a/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml +++ b/master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/Person_updateOpenSaleOrder.xml @@ -66,8 +66,10 @@ def storeWorkflowComment(document, comment):\n portal.portal_workflow.doActionFor(document, \'edit_action\', comment=comment)\n \n add_kw_kw, modify_kw_kw, remove_id_list = context.Person_getOpenSaleOrderDifference(\n - remove_hosting_list=remove_hosting_list, add_kw_list=add_kw_list,\n - stop_date=stop_date, start_date_tuple_list=start_date_tuple_list)\n + remove_hosting_list=remove_hosting_list,\n + add_kw_list=add_kw_list,\n + stop_date=stop_date,\n + start_date_tuple_list=start_date_tuple_list)\n \n if src__== 1:\n return add_kw_kw, modify_kw_kw, remove_id_list\n diff --git a/master/bt5/slapos_accounting/bt/revision b/master/bt5/slapos_accounting/bt/revision index e99fdcc524490dab1572edae62443278a789b5e9..cc4f7f3feba9cb8765296f4ce390a79adf482e95 100644 --- a/master/bt5/slapos_accounting/bt/revision +++ b/master/bt5/slapos_accounting/bt/revision @@ -1 +1 @@ -217 \ No newline at end of file +218 \ No newline at end of file