From 7265d4e59634c980ea2d7da3389579ad183c0a7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com>
Date: Tue, 18 Jul 2006 15:38:53 +0000
Subject: [PATCH] 2006-07-18 aurel * add and modify some script for checking
 counter and counter date

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8506 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../LocalRolesTemplateItem/.xml               |   9 -
 .../PortalTypeRolesTemplateItem/.xml          |   2 -
 .../Baobab_checkCounterOpened.xml             | 162 ++++++++++++++++++
 bt5/erp5_banking_core/bt/change_log           |  19 ++
 4 files changed, 181 insertions(+), 11 deletions(-)
 delete mode 100644 bt5/erp5_banking_core/LocalRolesTemplateItem/.xml
 delete mode 100644 bt5/erp5_banking_core/PortalTypeRolesTemplateItem/.xml
 create mode 100644 bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterOpened.xml

diff --git a/bt5/erp5_banking_core/LocalRolesTemplateItem/.xml b/bt5/erp5_banking_core/LocalRolesTemplateItem/.xml
deleted file mode 100644
index 89a84bc911..0000000000
--- a/bt5/erp5_banking_core/LocalRolesTemplateItem/.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<local_roles_item>
- <local_roles>
-  <role id='zope'>
-   <item>Owner</item>
-  </role>
- </local_roles>
- <group_local_roles>
- </group_local_roles>
-</local_roles_item>
\ No newline at end of file
diff --git a/bt5/erp5_banking_core/PortalTypeRolesTemplateItem/.xml b/bt5/erp5_banking_core/PortalTypeRolesTemplateItem/.xml
deleted file mode 100644
index 600ebe860d..0000000000
--- a/bt5/erp5_banking_core/PortalTypeRolesTemplateItem/.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<type_roles>
-</type_roles>
\ No newline at end of file
diff --git a/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterOpened.xml b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterOpened.xml
new file mode 100644
index 0000000000..c6cfb16b72
--- /dev/null
+++ b/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/Baobab_checkCounterOpened.xml
@@ -0,0 +1,162 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </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>site = context.Baobab_getVaultSite(counter)\n
+counter_list = [x.getObject() for x in context.portal_catalog(portal_type="Counter", simulation_state = \'open\', site_uid = site.getUid())]\n
+for counter_ob in counter_list:\n
+  context.log(counter.getRelativeUrl(), counter_ob.getSite())\n
+  if counter_ob.getSite() in counter.getRelativeUrl() or counter.getRelativeUrl() in counter_ob.getSite():\n
+    return 1\n
+else:\n
+  return 0\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Baobab_checkCounterOpened</string> </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>counter</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>counter</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>site</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>_getiter_</string>
+                            <string>x</string>
+                            <string>counter_list</string>
+                            <string>counter_ob</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>Baobab_checkCounterOpened</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_banking_core/bt/change_log b/bt5/erp5_banking_core/bt/change_log
index 0a0f4dd1cb..c73b73b85a 100644
--- a/bt5/erp5_banking_core/bt/change_log
+++ b/bt5/erp5_banking_core/bt/change_log
@@ -1,3 +1,22 @@
+2006-07-18 aurel
+* add and modify some script for checking counter and counter date
+
+2006-07-15 Seb
+* added check book model module
+
+2006-07-03 aurel
+* update generic fast input script
+
+2006-06-26 Seb
+* Fixed display of inventory lines
+
+2006-06-16 seb
+* Added work done by Aurelien on fast input
+* Some minor changes
+
+2006-06-02 aurel
+* add vault type base category to category
+
 2006-05-18 aurel
 * update Delivery_getVaultItemList to take new categories into account and fix   Baobab_getResourceVintageList
 
-- 
2.30.9