From f4417084d0cbdc6d6093c10a12745292410e079c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Mon, 19 Dec 2005 08:52:43 +0000
Subject: [PATCH] added stat scripts for accounting transaction view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4732 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...untingTransactionLine_statSourceCredit.xml | 162 ++++++++++++++++++
 ...ountingTransactionLine_statSourceDebit.xml | 162 ++++++++++++++++++
 2 files changed, 324 insertions(+)
 create mode 100755 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceCredit.xml
 create mode 100755 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceDebit.xml

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceCredit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceCredit.xml
new file mode 100755
index 0000000000..8590b706f2
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceCredit.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> <string encoding="base64">O/INCg==</string> </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>total = 0\n
+for line in context.objectValues(portal_type = context.getPortalAccountingMovementTypeList()) :\n
+  total += line.getSourceCredit()\n
+  \n
+return total\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAYAAAAKAAAASwAA
+AHNZAAAAZAEAfQEAeEgAdAEAdAIAdAMAZAIAgwIAZAMAdAIAdAMAZAQAgwIAgwAAgwABgwEARF0c
+AH0FAHwBAHQCAHwFAGQFAIMCAIMAADd9AQBxMQBXfAEAU2QAAFMoBgAAAE5pAAAAAHMMAAAAb2Jq
+ZWN0VmFsdWVzcwsAAABwb3J0YWxfdHlwZXMjAAAAZ2V0UG9ydGFsQWNjb3VudGluZ01vdmVtZW50
+VHlwZUxpc3RzDwAAAGdldFNvdXJjZUNyZWRpdCgFAAAAcwUAAAB0b3RhbHMJAAAAX2dldGl0ZXJf
+cwkAAABfZ2V0YXR0cl9zBwAAAGNvbnRleHRzBAAAAGxpbmUoBgAAAHMCAAAAa3dzBQAAAHRvdGFs
+cwkAAABfZ2V0aXRlcl9zCQAAAF9nZXRhdHRyX3MHAAAAY29udGV4dHMEAAAAbGluZSgAAAAAKAAA
+AABzDwAAAFNjcmlwdCAoUHl0aG9uKXMqAAAAQWNjb3VudGluZ1RyYW5zYWN0aW9uTGluZV9zdGF0
+U291cmNlQ3JlZGl0AQAAAHMIAAAABgErAAYBGgIoAQAAAHMqAAAAQWNjb3VudGluZ1RyYW5zYWN0
+aW9uTGluZV9zdGF0U291cmNlQ3JlZGl0KAEAAABzKgAAAEFjY291bnRpbmdUcmFuc2FjdGlvbkxp
+bmVfc3RhdFNvdXJjZUNyZWRpdCgAAAAAKAAAAABzDwAAAFNjcmlwdCAoUHl0aG9uKXMIAAAAPG1v
+ZHVsZT4BAAAAcwAAAAA=</string> </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceCredit</string> </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**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>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>total</string>
+                            <string>_getiter_</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>line</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>AccountingTransactionLine_statSourceCredit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceDebit.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceDebit.xml
new file mode 100755
index 0000000000..002bae9756
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceDebit.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> <string encoding="base64">O/INCg==</string> </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>total = 0\n
+for line in context.objectValues(portal_type = context.getPortalAccountingMovementTypeList()) :\n
+  total += line.getSourceDebit()\n
+  \n
+return total\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAYAAAAKAAAASwAA
+AHNZAAAAZAEAfQEAeEgAdAEAdAIAdAMAZAIAgwIAZAMAdAIAdAMAZAQAgwIAgwAAgwABgwEARF0c
+AH0FAHwBAHQCAHwFAGQFAIMCAIMAADd9AQBxMQBXfAEAU2QAAFMoBgAAAE5pAAAAAHMMAAAAb2Jq
+ZWN0VmFsdWVzcwsAAABwb3J0YWxfdHlwZXMjAAAAZ2V0UG9ydGFsQWNjb3VudGluZ01vdmVtZW50
+VHlwZUxpc3RzDgAAAGdldFNvdXJjZURlYml0KAUAAABzBQAAAHRvdGFscwkAAABfZ2V0aXRlcl9z
+CQAAAF9nZXRhdHRyX3MHAAAAY29udGV4dHMEAAAAbGluZSgGAAAAcwIAAABrd3MFAAAAdG90YWxz
+CQAAAF9nZXRpdGVyX3MJAAAAX2dldGF0dHJfcwcAAABjb250ZXh0cwQAAABsaW5lKAAAAAAoAAAA
+AHMPAAAAU2NyaXB0IChQeXRob24pcykAAABBY2NvdW50aW5nVHJhbnNhY3Rpb25MaW5lX3N0YXRT
+b3VyY2VEZWJpdAEAAABzCAAAAAYBKwAGARoCKAEAAABzKQAAAEFjY291bnRpbmdUcmFuc2FjdGlv
+bkxpbmVfc3RhdFNvdXJjZURlYml0KAEAAABzKQAAAEFjY291bnRpbmdUcmFuc2FjdGlvbkxpbmVf
+c3RhdFNvdXJjZURlYml0KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxl
+PgEAAABzAAAAAA==</string> </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/AccountingTransactionLine_statSourceDebit</string> </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>**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>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>kw</string>
+                            <string>total</string>
+                            <string>_getiter_</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>line</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>AccountingTransactionLine_statSourceDebit</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
-- 
2.30.9