[Erp5-report] r20995 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 16 15:19:05 CEST 2008


Author: jerome
Date: Fri May 16 15:19:01 2008
New Revision: 20995

URL: http://svn.erp5.org?rev=20995&view=rev
Log:
2008-05-16 jerome
* Introduce scripts to help report creation.

Added:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportBalance.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.xml
Modified:
    erp5/trunk/bt5/erp5_accounting/bt/change_log
    erp5/trunk/bt5/erp5_accounting/bt/revision

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportBalance.xml?rev=20995&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportBalance.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportBalance.xml Fri May 16 15:19:01 2008
@@ -1,0 +1,195 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </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>"""\n
+  This scripts add the balance of every gap account in the list \'account_id_list\'\n
+  it use portal_simulation.getInventory. \n
+\n
+  The following REQUEST keys are mandatory : \n
+      at_date\n
+\n
+  those are optional : \n
+      gap_base\n
+      simulation_state\n
+      resource\n
+      section_category\n
+\n
+  those are ignored from the request and should explicitely passed as keywords args to this script : \n
+      from_date\n
+  \n
+  parameters keywords to this script overrides REQUEST keys\n
+\n
+"""\n
+portal = context.getPortalObject()\n
+request = context.REQUEST\n
+\n
+kw = dict(kwd)\n
+kw[\'simulation_state\'] = kwd.get(\'simulation_state\', request.get(\'simulation_state\'))\n
+kw["section_category"] = kwd.get(\'section_category\', request.get(\'section_category\'))\n
+kw["at_date"] = request[\'at_date\'].latestTime()\n
+at_date = kwd.get(\'at_date\', request[\'at_date\'])\n
+kw[\'at_date\'] = at_date.latestTime()\n
+\n
+if request.get(\'account_id_list_conversion_script_id\'):\n
+  account_id_list_conversion_script = getattr(portal, request[\'account_id_list_conversion_script_id\'])\n
+  kw[\'node_category\'] = account_id_list_conversion_script(account_id_list)\n
+else:\n
+  kw[\'node_category\'] = account_id_list\n
+\n
+context.log(kw)\n
+\n
+return portal.portal_simulation.getInventoryAssetPrice(**kw) or 0.0\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>account_id_list, **kwd</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>account_id_list</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>portal</string>
+                            <string>request</string>
+                            <string>dict</string>
+                            <string>kw</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>at_date</string>
+                            <string>getattr</string>
+                            <string>account_id_list_conversion_script</string>
+                            <string>_apply_</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>AccountModule_getFiscalReportBalance</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.xml?rev=20995&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorNodeBalance.xml Fri May 16 15:19:01 2008
@@ -1,0 +1,192 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script adds accounts value, only if they are creditors\n
+"""\n
+\n
+request = context.REQUEST\n
+portal = context.getPortalObject()\n
+\n
+kw = dict(kwd)\n
+kw[\'simulation_state\'] = kwd.get(\'simulation_state\', request.get(\'simulation_state\'))\n
+kw["section_category"] = kwd.get(\'section_category\', request.get(\'section_category\'))\n
+at_date = kwd.get(\'at_date\', request[\'at_date\'])\n
+kw[\'at_date\'] = at_date.latestTime()\n
+\n
+if request.get(\'account_id_list_conversion_script_id\'):\n
+  account_id_list_conversion_script = getattr(portal, request[\'account_id_list_conversion_script_id\'])\n
+  kw[\'node_category\'] = account_id_list_conversion_script(account_id_list)\n
+else:\n
+  kw[\'node_category\'] = account_id_list\n
+\n
+sum = 0.0\n
+for inventory in portal.portal_simulation.getInventoryList(\n
+                                    group_by_node=1,\n
+                                    group_by_mirror_section=1,\n
+                                    **kw):\n
+  if inventory.total_price < 0:\n
+    sum += (inventory.total_price or 0)\n
+return sum\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>account_id_list, **kwd</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>account_id_list</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>portal</string>
+                            <string>dict</string>
+                            <string>kw</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>at_date</string>
+                            <string>getattr</string>
+                            <string>account_id_list_conversion_script</string>
+                            <string>sum</string>
+                            <string>_getiter_</string>
+                            <string>_apply_</string>
+                            <string>inventory</string>
+                            <string>_inplacevar_</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>AccountModule_getFiscalReportCreditorNodeBalance</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.xml?rev=20995&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportCreditorPaymentBalance.xml Fri May 16 15:19:01 2008
@@ -1,0 +1,192 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script adds bank accounts balances, only if they are creditors\n
+"""\n
+\n
+request = context.REQUEST\n
+portal = context.getPortalObject()\n
+\n
+kw = dict(kwd)\n
+kw[\'simulation_state\'] = kwd.get(\'simulation_state\', request.get(\'simulation_state\'))\n
+kw["section_category"] = kwd.get(\'section_category\', request.get(\'section_category\'))\n
+at_date = kwd.get(\'at_date\', request[\'at_date\'])\n
+kw[\'at_date\'] = at_date.latestTime()\n
+\n
+if request.get(\'account_id_list_conversion_script_id\'):\n
+  account_id_list_conversion_script = getattr(portal, request[\'account_id_list_conversion_script_id\'])\n
+  kw[\'node_category\'] = account_id_list_conversion_script(account_id_list)\n
+else:\n
+  kw[\'node_category\'] = account_id_list\n
+\n
+sum = 0.0\n
+for inventory in portal.portal_simulation.getInventoryList(\n
+                                    group_by_payment=1,\n
+                                    group_by_node=1,\n
+                                    **kw):\n
+  if inventory.total_price < 0:\n
+    sum += (inventory.total_price or 0)\n
+return sum\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>account_id_list, **kwd</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>account_id_list</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>portal</string>
+                            <string>dict</string>
+                            <string>kw</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>at_date</string>
+                            <string>getattr</string>
+                            <string>account_id_list_conversion_script</string>
+                            <string>sum</string>
+                            <string>_getiter_</string>
+                            <string>_apply_</string>
+                            <string>inventory</string>
+                            <string>_inplacevar_</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>AccountModule_getFiscalReportCreditorPaymentBalance</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.xml?rev=20995&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorNodeBalance.xml Fri May 16 15:19:01 2008
@@ -1,0 +1,192 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script adds accounts value, only if they are debtors\n
+"""\n
+\n
+request = context.REQUEST\n
+portal = context.getPortalObject()\n
+\n
+kw = dict(kwd)\n
+kw[\'simulation_state\'] = kwd.get(\'simulation_state\', request.get(\'simulation_state\'))\n
+kw["section_category"] = kwd.get(\'section_category\', request.get(\'section_category\'))\n
+at_date = kwd.get(\'at_date\', request[\'at_date\'])\n
+kw[\'at_date\'] = at_date.latestTime()\n
+\n
+if request.get(\'account_id_list_conversion_script_id\'):\n
+  account_id_list_conversion_script = getattr(portal, request[\'account_id_list_conversion_script_id\'])\n
+  kw[\'node_category\'] = account_id_list_conversion_script(account_id_list)\n
+else:\n
+  kw[\'node_category\'] = account_id_list\n
+\n
+sum = 0.0\n
+for inventory in portal.portal_simulation.getInventoryList(\n
+                                    group_by_node=1,\n
+                                    group_by_mirror_section=1,\n
+                                    **kw):\n
+  if inventory.total_price > 0:\n
+    sum += inventory.total_price\n
+return sum\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>account_id_list, **kwd</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>account_id_list</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>portal</string>
+                            <string>dict</string>
+                            <string>kw</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>at_date</string>
+                            <string>getattr</string>
+                            <string>account_id_list_conversion_script</string>
+                            <string>sum</string>
+                            <string>_getiter_</string>
+                            <string>_apply_</string>
+                            <string>inventory</string>
+                            <string>_inplacevar_</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>AccountModule_getFiscalReportDebitorNodeBalance</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.xml?rev=20995&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getFiscalReportDebitorPaymentBalance.xml Fri May 16 15:19:01 2008
@@ -1,0 +1,192 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script adds bank accounts balances, only if they are debtors\n
+"""\n
+\n
+request = context.REQUEST\n
+portal = context.getPortalObject()\n
+\n
+kw = dict(kwd)\n
+kw[\'simulation_state\'] = kwd.get(\'simulation_state\', request.get(\'simulation_state\'))\n
+kw["section_category"] = kwd.get(\'section_category\', request.get(\'section_category\'))\n
+at_date = kwd.get(\'at_date\', request[\'at_date\'])\n
+kw[\'at_date\'] = at_date.latestTime()\n
+\n
+if request.get(\'account_id_list_conversion_script_id\'):\n
+  account_id_list_conversion_script = getattr(portal, request[\'account_id_list_conversion_script_id\'])\n
+  kw[\'node_category\'] = account_id_list_conversion_script(account_id_list)\n
+else:\n
+  kw[\'node_category\'] = account_id_list\n
+\n
+sum = 0.0\n
+for inventory in portal.portal_simulation.getInventoryList(\n
+                                    group_by_payment=1,\n
+                                    group_by_node=1,\n
+                                    **kw):\n
+  if inventory.total_price > 0:\n
+    sum += inventory.total_price\n
+return sum\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>account_id_list, **kwd</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>account_id_list</string>
+                            <string>kwd</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>request</string>
+                            <string>portal</string>
+                            <string>dict</string>
+                            <string>kw</string>
+                            <string>_write_</string>
+                            <string>_getitem_</string>
+                            <string>at_date</string>
+                            <string>getattr</string>
+                            <string>account_id_list_conversion_script</string>
+                            <string>sum</string>
+                            <string>_getiter_</string>
+                            <string>_apply_</string>
+                            <string>inventory</string>
+                            <string>_inplacevar_</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>AccountModule_getFiscalReportDebitorPaymentBalance</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_accounting/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/change_log?rev=20995&r1=20994&r2=20995&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/change_log Fri May 16 15:19:01 2008
@@ -1,3 +1,6 @@
+2008-05-16 jerome
+* Introduce scripts to help report creation.
+
 2008-05-14 jerome
 * Use absolute_url when necessary to produce URLs compatible with virtual hosting.
 

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=20995&r1=20994&r2=20995&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Fri May 16 15:19:01 2008
@@ -1,1 +1,1 @@
-697
+699




More information about the Erp5-report mailing list