From 865161c2bf5239d0a82fe9c032600c093a4e0fab Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 13 Apr 2011 11:54:00 +0000
Subject: [PATCH] PS for Category Membership State Constraint

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45367 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../CategoryMembershipStateConstraint.xml     | 70 +++++++++++++++++++
 .../base_category_property.xml                | 34 +++++++++
 .../membership_portal_type_list_property.xml  | 34 +++++++++
 .../message_different_state_property.xml      | 42 +++++++++++
 .../workflow_state_list_property.xml          | 34 +++++++++
 .../workflow_variable_property.xml            | 34 +++++++++
 .../erp5_property_sheets/bt/revision          |  2 +-
 .../bt/template_property_sheet_id_list        |  1 +
 8 files changed, 250 insertions(+), 1 deletion(-)
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint.xml
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/base_category_property.xml
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/membership_portal_type_list_property.xml
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/message_different_state_property.xml
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_state_list_property.xml
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_variable_property.xml

diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint.xml
new file mode 100644
index 0000000000..c4757e175f
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint.xml
@@ -0,0 +1,70 @@
+<?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>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>CategoryMembershipStateConstraint</string> </value>
+        </item>
+        <item>
+            <key> <string>last_id</string> </key>
+            <value> <string>6</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/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/base_category_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/base_category_property.xml
new file mode 100644
index 0000000000..b446b8b722
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/base_category_property.xml
@@ -0,0 +1,34 @@
+<?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>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>base_category_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/membership_portal_type_list_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/membership_portal_type_list_property.xml
new file mode 100644
index 0000000000..2081011a7c
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/membership_portal_type_list_property.xml
@@ -0,0 +1,34 @@
+<?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>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>membership_portal_type_list_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/message_different_state_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/message_different_state_property.xml
new file mode 100644
index 0000000000..2d93e348cc
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/message_different_state_property.xml
@@ -0,0 +1,42 @@
+<?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>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>Available variable for error message are:\n
+* workflow_variable\n
+* membership_url\n
+* membership_title\n
+* membership_reference (if any)\n
+* current_state\n
+* workflow_state_list</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>message_different_state_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>property_default</string> </key>
+            <value> <string>string:$${workflow_variable} for document $${membership_url} is $${current_state} which is not in $${workflow_state_list}\'</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_state_list_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_state_list_property.xml
new file mode 100644
index 0000000000..a2e52712fa
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_state_list_property.xml
@@ -0,0 +1,34 @@
+<?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>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>workflow_state_list_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_variable_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_variable_property.xml
new file mode 100644
index 0000000000..4813814151
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/CategoryMembershipStateConstraint/workflow_variable_property.xml
@@ -0,0 +1,34 @@
+<?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>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/string</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>workflow_variable_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
index 8fdd954df9..b393560759 100644
--- a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
+++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
@@ -1 +1 @@
-22
\ No newline at end of file
+23
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list b/product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
index 45ba68f143..455332d23e 100644
--- a/product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
+++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
@@ -48,6 +48,7 @@ CatalogPreference
 CategoryCore
 CategoryExistenceConstraint
 CategoryMembershipArityConstraint
+CategoryMembershipStateConstraint
 CategoryRelatedMembershipArityConstraint
 Chain
 Codification
-- 
2.30.9