From 305c623e60272fd8561fab251b3fc65689501ca0 Mon Sep 17 00:00:00 2001
From: Sebastien Robin <seb@nexedi.com>
Date: Thu, 17 Feb 2011 16:44:34 +0000
Subject: [PATCH] provide new propertysheet by path until there is proper way
 to export it

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43441 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../AccountTypeConstraint.xml                 | 70 +++++++++++++++++++
 .../AccountTypeConstraint/2.xml               | 40 +++++++++++
 bt5/erp5_accounting/bt/revision               |  2 +-
 bt5/erp5_accounting/bt/template_path_list     |  4 +-
 4 files changed, 114 insertions(+), 2 deletions(-)
 create mode 100644 bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint.xml
 create mode 100644 bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint/2.xml

diff --git a/bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint.xml b/bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint.xml
new file mode 100644
index 00000000000..27cb9dfaf9d
--- /dev/null
+++ b/bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint.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>AccountTypeConstraint</string> </value>
+        </item>
+        <item>
+            <key> <string>last_id</string> </key>
+            <value> <string>2</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_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint/2.xml b/bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint/2.xml
new file mode 100644
index 00000000000..b79d617f796
--- /dev/null
+++ b/bt5/erp5_accounting/PathTemplateItem/portal_property_sheets/AccountTypeConstraint/2.xml
@@ -0,0 +1,40 @@
+<?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>default_reference</string> </key>
+            <value> <string>message_inconsistent_account_type</string> </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>Error message when wrong account type is found</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>2</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>python: \'Account is member of ${category}, this should have account_type in ${account_type_list}\'</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 7f06f5c97a3..585cf67a07c 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-1445
\ No newline at end of file
+1446
\ No newline at end of file
diff --git a/bt5/erp5_accounting/bt/template_path_list b/bt5/erp5_accounting/bt/template_path_list
index 930f8dd7f8e..2492f3a7589 100644
--- a/bt5/erp5_accounting/bt/template_path_list
+++ b/bt5/erp5_accounting/bt/template_path_list
@@ -1,2 +1,4 @@
 portal_categories/account_type/**
-portal_categories/financial_section/*
\ No newline at end of file
+portal_categories/financial_section/*
+portal_property_sheets/AccountTypeConstraint
+portal_property_sheets/AccountTypeConstraint/**
\ No newline at end of file
-- 
2.30.9