Commit 17d73176 authored by Rafael Monnerat's avatar Rafael Monnerat

Commit New domains for Planning Box

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18279 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e4ae71b
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.Document.Category</string>
<string>Category</string>
</tuple>
<none/>
<global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -19,60 +16,38 @@
</value>
</item>
<item>
<key> <string>_count</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>zoom/first_zoom_level</string>
</tuple>
</value>
</item>
<item>
<key> <string>codification</string> </key>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateDayDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>first_zoom_level</string> </value>
<value> <string>base_day_domain</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>1</int> </value>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -87,44 +62,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.Document.Category</string>
<string>Category</string>
</tuple>
<none/>
<global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -19,35 +16,15 @@
</value>
</item>
<item>
<key> <string>_count</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>zoom/third_zoom_level</string>
</tuple>
</value>
</item>
<item>
<key> <string>codification</string> </key>
<value>
<none/>
<dictionary/>
</value>
</item>
<item>
......@@ -57,12 +34,12 @@
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>third_zoom_level</string> </value>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateMonthDomain</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>30</int> </value>
<key> <string>id</string> </key>
<value> <string>base_month_domain</string> </value>
</item>
<item>
<key> <string>last_id</string> </key>
......@@ -70,13 +47,7 @@
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -91,44 +62,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.Document.Category</string>
<string>Category</string>
</tuple>
<none/>
<global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -19,60 +16,38 @@
</value>
</item>
<item>
<key> <string>_count</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>zoom/second_zoom_level</string>
</tuple>
</value>
</item>
<item>
<key> <string>codification</string> </key>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateWeekDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>second_zoom_level</string> </value>
<value> <string>base_week_domain</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>7</int> </value>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -87,44 +62,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Type.Document.Category</string>
<string>Category</string>
</tuple>
<none/>
<global name="BaseDomain" module="Products.ERP5Type.Document.BaseDomain"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -19,61 +16,38 @@
</value>
</item>
<item>
<key> <string>_count</string> </key>
<key> <string>_identity_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<key> <string>_range_criterion</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<dictionary/>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>zoom/fourth_zoom_level</string>
<string>zoom/fourth_zoom_level</string>
</tuple>
</value>
</item>
<item>
<key> <string>codification</string> </key>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateYearDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>fourth_zoom_level</string> </value>
<value> <string>base_year_domain</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>365</int> </value>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Category</string> </value>
</item>
<item>
<key> <string>string_index</string> </key>
<value>
<none/>
</value>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......@@ -88,44 +62,4 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>BTrees.Length</string>
<string>Length</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<tuple>
<string>BTrees.OOBTree</string>
<string>OOBTree</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</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>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
from Products.ERP5Type.Message import Message\n
from Products.ERP5Type.Document import newTempBase\n
from string import zfill\n
portal_object = context.getPortalObject()\n
request = context.REQUEST\n
domain_list = []\n
\n
selection_name = request.get(\'selection_name\')\n
selection = context.portal_selections.getSelectionFor(\n
selection_name, request)\n
\n
params = selection.getParams()\n
bound_start = DateTime(params.get(\'bound_start\', DateTime()))\n
bound_start = DateTime(bound_start.year() , bound_start.month() , bound_start.day()) \n
\n
bound_start = bound_start + params.get(\'bound_variation\', 0)\n
bound_stop = bound_start + 1\n
\n
# Definning date order using user Preference Options\n
try:\n
date_order = context.portal_preferences.getActivePreference().getPreferredDateOrder()\n
if (date_order is None) or date_order not in [ \'dmy\', \'ymd\' , \'mdy\' ]:\n
date_order = \'ymd\'\n
except AttributeError:\n
date_order = \'ymd\'\n
\n
category_list = []\n
if depth == 0:\n
current_date = bound_start\n
# This zoom will show one day divided in columns that represents 3 hours.\n
# 0.125 means 3 hours in DateTime float format\n
while current_date < bound_stop:\n
# Create one Temp Object\n
o = newTempBase(portal_object, id=\'year\' ,uid=\'new_%s\' % zfill(\'year\',4))\n
# Setting Axis Dates start and stop\n
o.setProperty(\'start\',current_date)\n
o.setProperty(\'stop\', current_date + 0.125)\n
o.setProperty(\'relative_position\', int(current_date))\n
\n
# Seting delimiter\n
if current_date.hour() == 12:\n
o.setProperty(\'delimiter_type\', 1)\n
else:\n
o.setProperty(\'delimiter_type\', 0)\n
\n
# defining date order\n
date_order_list = []\n
for i in date_order:\n
if i == \'d\': date_order_list.append(current_date.day())\n
if i == \'m\': date_order_list.append(current_date.month())\n
title = \'%s %s/%s %s:00\' % (Message(domain=\'erp5_ui\',message=current_date.Day(),\n
mapping=None),\n
str(date_order_list[0]), str(date_order_list[1]),\n
str(current_date.hour()))\n
o.setProperty(\'title\', title)\n
tp = \'%s %s\' % (Message(domain=\'erp5_ui\', message=current_date.Day(),mapping=None), str(current_date))\n
o.setProperty(\'tooltip\', tp) \n
\n
category_list.append(o) \n
\n
current_date = current_date + 0.125\n
\n
else:\n
return domain_list\n
\n
for category in category_list:\n
domain = parent.generateTempDomain(id = \'sub\' + category.getProperty(\'id\'))\n
domain.edit(title = category.getTitle(),\n
membership_criterion_base_category = (\'parent\', ), \n
membership_criterion_category = (category,),\n
domain_generator_method_id = script.id,\n
uid = category.getUid())\n
\n
domain_list.append(domain)\n
\n
context.log("%s on %s" % (script.getId(), context.getPath()), "%d objects domain" % len(domain_list))\n
return domain_list\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>depth</string>
<string>parent</string>
<string>kw</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>string</string>
<string>zfill</string>
<string>_getattr_</string>
<string>context</string>
<string>portal_object</string>
<string>request</string>
<string>domain_list</string>
<string>selection_name</string>
<string>selection</string>
<string>params</string>
<string>DateTime</string>
<string>bound_start</string>
<string>bound_stop</string>
<string>date_order</string>
<string>None</string>
<string>AttributeError</string>
<string>category_list</string>
<string>current_date</string>
<string>o</string>
<string>int</string>
<string>date_order_list</string>
<string>_getiter_</string>
<string>i</string>
<string>str</string>
<string>_getitem_</string>
<string>title</string>
<string>tp</string>
<string>category</string>
<string>domain</string>
<string>script</string>
<string>len</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateDayDomain</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
638
\ No newline at end of file
640
\ No newline at end of file
......@@ -11,5 +11,8 @@ portal_caches/erp5_ui_medium
portal_caches/erp5_ui_medium/default_ram_cache
portal_caches/erp5_ui_short
portal_caches/erp5_ui_short/default_ram_cache
portal_categories/zoom/**
portal_domains/base_day_domain
portal_domains/base_month_domain
portal_domains/base_week_domain
portal_domains/base_year_domain
portal_preferences/default_site_preference
\ No newline at end of file
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