From de2b94c5da9a55b0a30e0a51bfc7fbfc6af1a674 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Thu, 3 Mar 2011 00:10:04 +0000
Subject: [PATCH] use new style propertysheets

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43922 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_types/Web%20Illustration.xml       |  2 +-
 .../portal_types/Web%20Table.xml              |  2 +-
 .../UNGPreference.py                          | 40 -------------
 .../portal_property_sheets/UNGPreference.xml  | 60 +++++++++++++++++++
 .../preferred_theme_sheet_editor_property.xml | 57 ++++++++++++++++++
 bt5/erp5_web_ung_core/bt/revision             |  2 +-
 6 files changed, 120 insertions(+), 43 deletions(-)
 delete mode 100644 bt5/erp5_web_ung_core/PropertySheetTemplateItem/UNGPreference.py
 create mode 100644 bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference.xml
 create mode 100644 bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference/preferred_theme_sheet_editor_property.xml

diff --git a/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Illustration.xml b/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Illustration.xml
index 58659d3859..cc017c3b52 100644
--- a/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Illustration.xml
+++ b/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Illustration.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+      <global name="Base Type" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
diff --git a/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Table.xml b/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Table.xml
index 261f654bee..bd0cc558a2 100644
--- a/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Table.xml
+++ b/bt5/erp5_web_ung_core/PortalTypeTemplateItem/portal_types/Web%20Table.xml
@@ -2,7 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+      <global name="Base Type" module="erp5.portal_type"/>
     </pickle>
     <pickle>
       <dictionary>
diff --git a/bt5/erp5_web_ung_core/PropertySheetTemplateItem/UNGPreference.py b/bt5/erp5_web_ung_core/PropertySheetTemplateItem/UNGPreference.py
deleted file mode 100644
index 9f7fb1d419..0000000000
--- a/bt5/erp5_web_ung_core/PropertySheetTemplateItem/UNGPreference.py
+++ /dev/null
@@ -1,40 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2002-2010 Nexedi SA and Contributors. All Rights Reserved.
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsibility of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# guarantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program is Free Software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-##############################################################################
-
-class UNGPreference:
-  """
-      UNGPreference properties for all ERP5 objects
-  """
-
-  _properties = (
-      {   'id'          : 'preferred_theme_sheet_editor',
-          'description' : 'The preferred theme to sheet editor',
-          'type'        : 'string',
-          'preference'  : '1',
-          'mode'        : 'w' 
-      },
-  )
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference.xml b/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference.xml
new file mode 100644
index 0000000000..70101d8f58
--- /dev/null
+++ b/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Property Sheet" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_count</string> </key>
+            <value>
+              <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+            </value>
+        </item>
+        <item>
+            <key> <string>_mt_index</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>id</string> </key>
+            <value> <string>UNGPreference</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Property Sheet</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <global name="Length" module="BTrees.Length"/>
+    </pickle>
+    <pickle> <int>0</int> </pickle>
+  </record>
+  <record id="3" aka="AAAAAAAAAAM=">
+    <pickle>
+      <global name="OOBTree" module="BTrees.OOBTree"/>
+    </pickle>
+    <pickle>
+      <none/>
+    </pickle>
+  </record>
+  <record id="4" aka="AAAAAAAAAAQ=">
+    <pickle>
+      <global name="OOBTree" module="BTrees.OOBTree"/>
+    </pickle>
+    <pickle>
+      <none/>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference/preferred_theme_sheet_editor_property.xml b/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference/preferred_theme_sheet_editor_property.xml
new file mode 100644
index 0000000000..3d10e10fc9
--- /dev/null
+++ b/bt5/erp5_web_ung_core/PropertySheetTemplateItem/portal_property_sheets/UNGPreference/preferred_theme_sheet_editor_property.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_local_properties</string> </key>
+            <value>
+              <tuple>
+                <dictionary>
+                  <item>
+                      <key> <string>id</string> </key>
+                      <value> <string>mode</string> </value>
+                  </item>
+                  <item>
+                      <key> <string>type</string> </key>
+                      <value> <string>string</string> </value>
+                  </item>
+                </dictionary>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>The preferred theme to sheet editor</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>preferred_theme_sheet_editor_property</string> </value>
+        </item>
+        <item>
+            <key> <string>mode</string> </key>
+            <value> <string>w</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>preference</string> </key>
+            <value> <int>1</int> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_web_ung_core/bt/revision b/bt5/erp5_web_ung_core/bt/revision
index 72f523f36e..86ee83a4a2 100644
--- a/bt5/erp5_web_ung_core/bt/revision
+++ b/bt5/erp5_web_ung_core/bt/revision
@@ -1 +1 @@
-39
\ No newline at end of file
+40
\ No newline at end of file
-- 
2.30.9