[Erp5-report] r17925 - in /erp5/trunk/bt5/erp5_csv_style: SkinTemplateItem/portal_skins/ Sk...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Nov 30 16:19:45 CET 2007


Author: jerome
Date: Fri Nov 30 16:19:44 2007
New Revision: 17925

URL: http://svn.erp5.org?rev=17925&view=rev
Log:
move all csv related skins from erp5_core to erp5_csv_style

Added:
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFile.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/your_export_only.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFile.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/my_import_file.xml
    erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvLine.xml
    erp5/trunk/bt5/erp5_csv_style/bt/template_tool_id_list
Modified:
    erp5/trunk/bt5/erp5_csv_style/bt/description
    erp5/trunk/bt5/erp5_csv_style/bt/revision
    erp5/trunk/bt5/erp5_csv_style/bt/template_skin_id_list

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,35 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="Folder" module="OFS.Folder"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>erp5_csv_core</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFile.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFile.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFile.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFile.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,166 @@
+<?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>request  = context.REQUEST\n
+\n
+from ZTUtils import make_query\n
+kw = { \'portal_skin\' : \'CSV\',\n
+       \'export_only\' : export_only }\n
+\n
+redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+form_id, \n
+                             make_query(kw) )\n
+\n
+return request[ \'RESPONSE\' ].redirect( redirect_url )\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>form_id=\'\', export_only=1</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>form_id</string>
+                            <string>export_only</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>ZTUtils</string>
+                            <string>make_query</string>
+                            <string>kw</string>
+                            <string>redirect_url</string>
+                            <string>_getitem_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <string></string>
+                <int>1</int>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Base_exportCsvFile</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,125 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ERP5Form" module="Products.ERP5Form.Form"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <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/>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value> <string>Base_exportCsvFile</string> </value>
+        </item>
+        <item>
+            <key> <string>encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>enctype</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>group_list</string> </key>
+            <value>
+              <list>
+                <string>left</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>groups</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>left</string> </key>
+                    <value>
+                      <list>
+                        <string>your_export_only</string>
+                      </list>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Base_exportCsvFileForm</string> </value>
+        </item>
+        <item>
+            <key> <string>method</string> </key>
+            <value> <string>POST</string> </value>
+        </item>
+        <item>
+            <key> <string>name</string> </key>
+            <value> <string>Base_exportCsvForm</string> </value>
+        </item>
+        <item>
+            <key> <string>pt</string> </key>
+            <value> <string>form_dialog</string> </value>
+        </item>
+        <item>
+            <key> <string>row_length</string> </key>
+            <value> <int>4</int> </value>
+        </item>
+        <item>
+            <key> <string>stored_encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Export CSV File</string> </value>
+        </item>
+        <item>
+            <key> <string>unicode_mode</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>update_action</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/your_export_only.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/your_export_only.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/your_export_only.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_exportCsvFileForm/your_export_only.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,282 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="IntegerField" module="Products.Formulator.StandardFields"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>your_export_only</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+                <item>
+                    <key> <string>integer_out_of_range</string> </key>
+                    <value> <string>The integer you entered was out of range.</string> </value>
+                </item>
+                <item>
+                    <key> <string>not_integer</string> </key>
+                    <value> <string>You did not enter an integer.</string> </value>
+                </item>
+                <item>
+                    <key> <string>required_not_found</string> </key>
+                    <value> <string>Input is required but no input given.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>end</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>start</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>end</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>start</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string>0</string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>20</int> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>end</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>start</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>your_export_only</string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.Formulator.TALESField</string>
+          <string>TALESMethod</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>string:</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFile.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFile.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFile.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFile.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,227 @@
+<?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>def cleanString(str):\n
+  clean_item = str\n
+  if clean_item.find(\'"\') != -1:\n
+    clean_item = clean_item[1:-1].replace(\'""\', \'"\')\n
+  else:\n
+    if clean_item != \'\':\n
+      if clean_item.find(\'.\') != -1:\n
+        clean_item = float(clean_item)\n
+      else:\n
+        clean_item = int(clean_item)\n
+    else:\n
+      clean_item = None\n
+  return clean_item\n
+\n
+def splitCsvLine(str_line):\n
+  unclean_list = []\n
+  pieces_of_line = str_line.split(\',\')\n
+\n
+  p_stack = \'\'\n
+  for p in pieces_of_line:\n
+    if p_stack == \'\':\n
+      p_stack = p\n
+    else:\n
+      p_stack += \',%s\' % p\n
+    if p_stack.count(\'"\') % 2 == 0:\n
+      unclean_list.append(p_stack)\n
+      p_stack = \'\'\n
+\n
+  return [cleanString(x) for x in unclean_list]\n
+\n
+request  = context.REQUEST\n
+# Read first line (attribute\'s ids)\n
+first_line = import_file.readline()\n
+first_line = first_line.replace(\'\\n\', \'\')\n
+csv_property_list = splitCsvLine(first_line)\n
+# Read second line (attribute\'s titles)\n
+second_line = import_file.readline()\n
+\n
+# Read data lines\n
+method = context.activate\n
+\n
+i = 0\n
+for line in iter(import_file.readline, ""):\n
+  # XXX Currently, if the file is too big, there is too many\n
+  # activities created in only one transaction\n
+  # We need to reduce the number of activities\n
+  # Ex: create 1 activity which manages 100 lines, by created itself 100 \n
+  # others activities\n
+  i += 1\n
+  line = line.replace(\'\\n\', \'\')\n
+  csv_data_list = splitCsvLine(line)\n
+\n
+  attribute_value_dict = dict([(csv_property_list[x], csv_data_list[x]) \\\n
+                               for x in xrange(len(csv_property_list))])\n
+\n
+  method(priority=4, activity="SQLQueue", passive_commit=1).Base_importCsvLine(attribute_value_dict)\n
+redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+\'view\', \'portal_status_message=Importing+CSV+file.\')\n
+request[ \'RESPONSE\' ].redirect( redirect_url )\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>import_file, **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>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>import_file</string>
+                            <string>kw</string>
+                            <string>cleanString</string>
+                            <string>splitCsvLine</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>first_line</string>
+                            <string>csv_property_list</string>
+                            <string>second_line</string>
+                            <string>method</string>
+                            <string>i</string>
+                            <string>_getiter_</string>
+                            <string>iter</string>
+                            <string>line</string>
+                            <string>_inplacevar_</string>
+                            <string>csv_data_list</string>
+                            <string>dict</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>xrange</string>
+                            <string>len</string>
+                            <string>x</string>
+                            <string>_getitem_</string>
+                            <string>attribute_value_dict</string>
+                            <string>redirect_url</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_importCsvFile</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,125 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ERP5Form" module="Products.ERP5Form.Form"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <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/>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_objects</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>action</string> </key>
+            <value> <string>Base_importCsvFile</string> </value>
+        </item>
+        <item>
+            <key> <string>encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>enctype</string> </key>
+            <value> <string>multipart/form-data</string> </value>
+        </item>
+        <item>
+            <key> <string>group_list</string> </key>
+            <value>
+              <list>
+                <string>left</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>groups</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>left</string> </key>
+                    <value>
+                      <list>
+                        <string>my_import_file</string>
+                      </list>
+                    </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Base_importCsvFileForm</string> </value>
+        </item>
+        <item>
+            <key> <string>method</string> </key>
+            <value> <string>POST</string> </value>
+        </item>
+        <item>
+            <key> <string>name</string> </key>
+            <value> <string>Base_importCsvFileForm</string> </value>
+        </item>
+        <item>
+            <key> <string>pt</string> </key>
+            <value> <string>form_dialog</string> </value>
+        </item>
+        <item>
+            <key> <string>row_length</string> </key>
+            <value> <int>4</int> </value>
+        </item>
+        <item>
+            <key> <string>stored_encoding</string> </key>
+            <value> <string>UTF-8</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Import CSV File</string> </value>
+        </item>
+        <item>
+            <key> <string>unicode_mode</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>update_action</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/my_import_file.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/my_import_file.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/my_import_file.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvFileForm/my_import_file.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,198 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.Formulator.StandardFields</string>
+          <string>FileField</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_import_file</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_maxwidth</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>display_width</string> </key>
+                    <value> <int>80</int> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Upload</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvLine.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvLine.xml?rev=17925&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvLine.xml (added)
+++ erp5/trunk/bt5/erp5_csv_style/SkinTemplateItem/portal_skins/erp5_csv_core/Base_importCsvLine.xml Fri Nov 30 16:19:44 2007
@@ -1,0 +1,166 @@
+<?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>if object_property_dict[\'uid\'] is None:\n
+  object = None\n
+else:\n
+  object = context.portal_catalog.getObject(object_property_dict[\'uid\'])\n
+\n
+if object == None:\n
+  object = context.newContent()\n
+\n
+# activity doesn\'t support security rights yet...\n
+for key in [\'uid\',\'id\']:\n
+  if object_property_dict.has_key(key):\n
+    object_property_dict.pop(key)\n
+\n
+object.edit(**object_property_dict)\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>object_property_dict</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>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>object_property_dict</string>
+                            <string>_getitem_</string>
+                            <string>None</string>
+                            <string>object</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>_getiter_</string>
+                            <string>key</string>
+                            <string>_apply_</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_importCsvLine</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_csv_style/bt/description
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/bt/description?rev=17925&r1=17924&r2=17925&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/bt/description (original)
+++ erp5/trunk/bt5/erp5_csv_style/bt/description Fri Nov 30 16:19:44 2007
@@ -1,1 +1,1 @@
-The ERP5 CSV style is used in order to export data into OpenOffice.org
+The ERP5 CSV style is used in order to export data as comma-separated values.

Modified: erp5/trunk/bt5/erp5_csv_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/bt/revision?rev=17925&r1=17924&r2=17925&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/bt/revision (original)
+++ erp5/trunk/bt5/erp5_csv_style/bt/revision Fri Nov 30 16:19:44 2007
@@ -1,1 +1,1 @@
-4
+5

Modified: erp5/trunk/bt5/erp5_csv_style/bt/template_skin_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/bt/template_skin_id_list?rev=17925&r1=17924&r2=17925&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_csv_style/bt/template_skin_id_list (original)
+++ erp5/trunk/bt5/erp5_csv_style/bt/template_skin_id_list Fri Nov 30 16:19:44 2007
@@ -1,1 +1,2 @@
+erp5_csv_core
 erp5_csv_style

Added: erp5/trunk/bt5/erp5_csv_style/bt/template_tool_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_csv_style/bt/template_tool_id_list?rev=17925&view=auto
==============================================================================
    (empty)




More information about the Erp5-report mailing list