[Erp5-report] r27854 - in /erp5/trunk/bt5: erp5_bpm/CatalogMethodTemplateItem/ erp5_bpm/Cat...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 1 17:23:14 CEST 2009


Author: luke
Date: Wed Jul  1 17:23:13 2009
New Revision: 27854

URL: http://svn.erp5.org?rev=27854&view=rev
Log:
 - extend list of selected movements used to create Accounting Transaction Lines by those, which are under Trade Model Rule
 - move catalog keys used in new queries from erp5_bpm
 - remove updated functionality from development erp5_bpm business template

Added:
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.catalog_keys.xml
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.xml
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.catalog_keys.xml
    erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.xml
    erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/
    erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/related_key_list.xml
Removed:
    erp5/trunk/bt5/erp5_bpm/CatalogMethodTemplateItem/
    erp5/trunk/bt5/erp5_bpm/CatalogRelatedKeyTemplateItem/
    erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/InvoiceTransaction_selectInvoiceMovement.xml
    erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/PurchaseInvoiceTransaction_selectInvoiceMovement.xml
    erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/SaleInvoiceTransaction_selectInvoiceMovement.xml
Modified:
    erp5/trunk/bt5/erp5_bpm/bt/revision
    erp5/trunk/bt5/erp5_bpm/bt/template_catalog_method_id_list
    erp5/trunk/bt5/erp5_bpm/bt/template_catalog_related_key_list
    erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectInvoiceMovement.xml
    erp5/trunk/bt5/erp5_invoicing/bt/revision
    erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_method_id_list
    erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_related_key_list

Removed: erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/InvoiceTransaction_selectInvoiceMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/InvoiceTransaction_selectInvoiceMovement.xml?rev=27853&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/InvoiceTransaction_selectInvoiceMovement.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/InvoiceTransaction_selectInvoiceMovement.xml (removed)
@@ -1,195 +1,0 @@
-<?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>Script_magic</string> </key>
-            <value> <int>3</int> </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>invoice_portal_type_mapping = {\n
-  \'Sale Invoice Transaction\': [\'Sale Order\', \'Sale Invoice Transaction\', \'Sale Packing List\'],\n
-  \'Purchase Invoice Transaction\': [\'Purchase Order\', \'Purchase Invoice Transaction\', \'Purchase Packing List\'],\n
-}\n
-src__ = kw.get(\'src__\',0)\n
-search_kw = kw.copy()\n
-\n
-search_kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
-search_kw[\'explanation_portal_type\']       = invoice_portal_type_mapping[invoice_portal_type]\n
-search_kw[\'portal_type\']                   = \'Simulation Movement\'\n
-search_kw[\'grand_parent_simulation_state\'] = [\'started\']\n
-\n
-search_kw.update(context.portal_catalog.buildSQLQuery(**search_kw))\n
-result = context.InvoiceTransaction_zSelectMovement(**search_kw)\n
-if src__:\n
-  normal_movement_list = result\n
-else:\n
-  normal_movement_list = [q for q in result]\n
-\n
-search_kw = kw.copy()\n
-\n
-search_kw[\'grand_grand_parent_specialise_portal_type\'] = \'Trade Model Rule\'\n
-search_kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
-search_kw[\'explanation_portal_type\']       = invoice_portal_type_mapping[invoice_portal_type]\n
-search_kw[\'portal_type\']                   = \'Simulation Movement\'\n
-search_kw[\'grand_grand_grand_parent_simulation_state\'] = [\'started\']\n
-\n
-search_kw.update(context.portal_catalog.buildSQLQuery(**search_kw))\n
-\n
-result = context.InvoiceTransaction_zSelectMovement(**search_kw)\n
-\n
-if src__:\n
-  trade_model_movement_list = result\n
-else:\n
-  trade_model_movement_list = [q for q in result]\n
-\n
-if src__:\n
-  return \'\\n\'.join((normal_movement_list, trade_model_movement_list))\n
-movement_list = []\n
-for movement in normal_movement_list + trade_model_movement_list:\n
-  movement = movement.getObject()\n
-  if movement.getDeliveryValue() is None :\n
-    if movement not in movement_list:\n
-      movement_list.append(movement)\n
-  else :\n
-    from Products.ERP5Type.Log import log\n
-    log(script.getId(), "simulation movement %s should not have been selected !" % movement.getPath())\n
-\n
-return movement_list\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</string> </key>
-            <value>
-              <none/>
-            </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>invoice_portal_type, **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>1</int> </value>
-                    </item>
-                    <item>
-                        <key> <string>co_varnames</string> </key>
-                        <value>
-                          <tuple>
-                            <string>invoice_portal_type</string>
-                            <string>kw</string>
-                            <string>invoice_portal_type_mapping</string>
-                            <string>_getattr_</string>
-                            <string>src__</string>
-                            <string>search_kw</string>
-                            <string>_write_</string>
-                            <string>_getitem_</string>
-                            <string>_apply_</string>
-                            <string>context</string>
-                            <string>result</string>
-                            <string>normal_movement_list</string>
-                            <string>append</string>
-                            <string>$append0</string>
-                            <string>_getiter_</string>
-                            <string>q</string>
-                            <string>trade_model_movement_list</string>
-                            <string>movement_list</string>
-                            <string>movement</string>
-                            <string>None</string>
-                            <string>Products.ERP5Type.Log</string>
-                            <string>log</string>
-                            <string>script</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>InvoiceTransaction_selectInvoiceMovement</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/PurchaseInvoiceTransaction_selectInvoiceMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/PurchaseInvoiceTransaction_selectInvoiceMovement.xml?rev=27853&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/PurchaseInvoiceTransaction_selectInvoiceMovement.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/PurchaseInvoiceTransaction_selectInvoiceMovement.xml (removed)
@@ -1,128 +1,0 @@
-<?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>Script_magic</string> </key>
-            <value> <int>3</int> </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>return context.InvoiceTransaction_selectInvoiceMovement(\'Purchase Invoice Transaction\',**kw)\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</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>_apply_</string>
-                            <string>_getattr_</string>
-                            <string>context</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>PurchaseInvoiceTransaction_selectInvoiceMovement</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/SaleInvoiceTransaction_selectInvoiceMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/SaleInvoiceTransaction_selectInvoiceMovement.xml?rev=27853&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/SaleInvoiceTransaction_selectInvoiceMovement.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/SkinTemplateItem/portal_skins/erp5_bpm/SaleInvoiceTransaction_selectInvoiceMovement.xml (removed)
@@ -1,128 +1,0 @@
-<?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>Script_magic</string> </key>
-            <value> <int>3</int> </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>return context.InvoiceTransaction_selectInvoiceMovement(\'Sale Invoice Transaction\',**kw)\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_code</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>_apply_</string>
-                            <string>_getattr_</string>
-                            <string>context</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>SaleInvoiceTransaction_selectInvoiceMovement</string> </value>
-        </item>
-        <item>
-            <key> <string>title</string> </key>
-            <value> <string></string> </value>
-        </item>
-        <item>
-            <key> <string>warnings</string> </key>
-            <value>
-              <tuple/>
-            </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Modified: erp5/trunk/bt5/erp5_bpm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/bt/revision?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/bt/revision [utf8] Wed Jul  1 17:23:13 2009
@@ -1,1 +1,1 @@
-197
+198

Modified: erp5/trunk/bt5/erp5_bpm/bt/template_catalog_method_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/bt/template_catalog_method_id_list?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/bt/template_catalog_method_id_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/bt/template_catalog_method_id_list [utf8] Wed Jul  1 17:23:13 2009
@@ -1,2 +1,0 @@
-erp5_mysql_innodb/z_related_grand_grand_grand_parent
-erp5_mysql_innodb/z_related_grand_grand_parent_specialise

Modified: erp5/trunk/bt5/erp5_bpm/bt/template_catalog_related_key_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_bpm/bt/template_catalog_related_key_list?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_bpm/bt/template_catalog_related_key_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_bpm/bt/template_catalog_related_key_list [utf8] Wed Jul  1 17:23:13 2009
@@ -1,2 +1,0 @@
-grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_parent
-grand_grand_parent_specialise_portal_type | category,catalog,catalog,catalog/portal_type/z_related_grand_grand_parent_specialise

Added: erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.catalog_keys.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.catalog_keys.xml?rev=27854&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.catalog_keys.xml (added)
+++ erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.catalog_keys.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,2 @@
+<catalog_method>
+</catalog_method>

Added: erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.xml?rev=27854&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.xml (added)
+++ erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_grand_parent.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,186 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_arg</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_data</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>table_0</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_1</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_2</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_3</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>_keys</string> </key>
+                        <value>
+                          <list>
+                            <string>table_0</string>
+                            <string>table_1</string>
+                            <string>table_2</string>
+                            <string>table_3</string>
+                          </list>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>allow_simple_one_argument_traversal</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>arguments_src</string> </key>
+            <value> <string>table_0\r\n
+table_1\r\n
+table_2\r\n
+table_3</string> </value>
+        </item>
+        <item>
+            <key> <string>cache_time_</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>class_file_</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>class_name_</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>connection_hook</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>connection_id</string> </key>
+            <value> <string>erp5_sql_connection</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>z_related_grand_grand_grand_parent</string> </value>
+        </item>
+        <item>
+            <key> <string>max_cache_</string> </key>
+            <value> <int>100</int> </value>
+        </item>
+        <item>
+            <key> <string>max_rows_</string> </key>
+            <value> <int>1000</int> </value>
+        </item>
+        <item>
+            <key> <string>src</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<dtml-var table_0>.uid = catalog.parent_uid\n
+AND <dtml-var table_1>.uid = <dtml-var table_0>.parent_uid\n
+AND <dtml-var table_2>.uid = <dtml-var table_1>.parent_uid\n
+AND <dtml-var table_3>.uid = <dtml-var table_2>.parent_uid\n
+\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>template</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="__newobj__" module="copy_reg"/>
+                </klass>
+                <tuple>
+                  <global name="SQL" module="Shared.DC.ZRDB.DA"/>
+                </tuple>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>__name__</string> </key>
+                        <value> <string encoding="cdata"><![CDATA[
+
+<string>
+
+]]></string> </value>
+                    </item>
+                    <item>
+                        <key> <string>_vars</string> </key>
+                        <value>
+                          <dictionary/>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>globals</string> </key>
+                        <value>
+                          <dictionary/>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>raw</string> </key>
+                        <value> <string encoding="cdata"><![CDATA[
+
+<dtml-var table_0>.uid = catalog.parent_uid\n
+AND <dtml-var table_1>.uid = <dtml-var table_0>.parent_uid\n
+AND <dtml-var table_2>.uid = <dtml-var table_1>.parent_uid\n
+AND <dtml-var table_3>.uid = <dtml-var table_2>.parent_uid\n
+\n
+
+
+]]></string> </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.catalog_keys.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.catalog_keys.xml?rev=27854&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.catalog_keys.xml (added)
+++ erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.catalog_keys.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,2 @@
+<catalog_method>
+</catalog_method>

Added: erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.xml?rev=27854&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.xml (added)
+++ erp5/trunk/bt5/erp5_invoicing/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_related_grand_grand_parent_specialise.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,186 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="SQL" module="Products.ZSQLMethods.SQL"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_arg</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_data</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>table_0</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_1</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_2</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                            <item>
+                                <key> <string>table_3</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>_keys</string> </key>
+                        <value>
+                          <list>
+                            <string>table_0</string>
+                            <string>table_1</string>
+                            <string>table_2</string>
+                            <string>table_3</string>
+                          </list>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>allow_simple_one_argument_traversal</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>arguments_src</string> </key>
+            <value> <string>table_0\r\n
+table_1\r\n
+table_2\r\n
+table_3</string> </value>
+        </item>
+        <item>
+            <key> <string>cache_time_</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>class_file_</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>class_name_</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>connection_hook</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>connection_id</string> </key>
+            <value> <string>erp5_sql_connection</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>z_related_grand_grand_parent_specialise</string> </value>
+        </item>
+        <item>
+            <key> <string>max_cache_</string> </key>
+            <value> <int>100</int> </value>
+        </item>
+        <item>
+            <key> <string>max_rows_</string> </key>
+            <value> <int>1000</int> </value>
+        </item>
+        <item>
+            <key> <string>src</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.specialise.getUid()">\n
+AND <dtml-var table_0>.uid = <dtml-var table_2>.parent_uid\n
+AND <dtml-var table_1>.uid = catalog.parent_uid\n
+AND <dtml-var table_2>.uid = <dtml-var table_1>.parent_uid\n
+AND <dtml-var table_3>.uid = <dtml-var table_0>.category_uid\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>template</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="__newobj__" module="copy_reg"/>
+                </klass>
+                <tuple>
+                  <global name="SQL" module="Shared.DC.ZRDB.DA"/>
+                </tuple>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>__name__</string> </key>
+                        <value> <string encoding="cdata"><![CDATA[
+
+<string>
+
+]]></string> </value>
+                    </item>
+                    <item>
+                        <key> <string>_vars</string> </key>
+                        <value>
+                          <dictionary/>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>globals</string> </key>
+                        <value>
+                          <dictionary/>
+                        </value>
+                    </item>
+                    <item>
+                        <key> <string>raw</string> </key>
+                        <value> <string encoding="cdata"><![CDATA[
+
+<dtml-var table_0>.base_category_uid = <dtml-var "portal_categories.specialise.getUid()">\n
+AND <dtml-var table_0>.uid = <dtml-var table_2>.parent_uid\n
+AND <dtml-var table_1>.uid = catalog.parent_uid\n
+AND <dtml-var table_2>.uid = <dtml-var table_1>.parent_uid\n
+AND <dtml-var table_3>.uid = <dtml-var table_0>.category_uid\n
+
+
+]]></string> </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/related_key_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/related_key_list.xml?rev=27854&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/related_key_list.xml (added)
+++ erp5/trunk/bt5/erp5_invoicing/CatalogRelatedKeyTemplateItem/related_key_list.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,4 @@
+<key_list>
+ <key>grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_parent</key>
+ <key>grand_grand_parent_specialise_portal_type | category,catalog,catalog,catalog/portal_type/z_related_grand_grand_parent_specialise</key>
+</key_list>

Modified: erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectInvoiceMovement.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectInvoiceMovement.xml?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectInvoiceMovement.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_selectInvoiceMovement.xml [utf8] Wed Jul  1 17:23:13 2009
@@ -53,7 +53,13 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
+            <value> <string>"""Returns Simulation Movements for invoice\n
+\n
+Simulation Movements can come from normal Invoice Transaction Rule\n
+and same rule which is children of Trade Model Rule """\n
+\n
+# search for normal movements\n
+kw[\'parent_specialise_portal_type\'] = \'Invoice Transaction Rule\'\n
 if context.Invoice_isAdvanced():\n
   kw[\'explanation_portal_type\']       = [\'%s Order\' % trade_type,\n
                                          \'%s Invoice\' % trade_type,\n
@@ -65,10 +71,24 @@
 kw[\'portal_type\']                   = \'Simulation Movement\'\n
 kw[\'grand_parent_simulation_state\'] = [\'started\']\n
 \n
-kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
+search_kw = kw.copy()\n
+search_kw.update(context.portal_catalog.buildSQLQuery(**search_kw))\n
+\n
+normal_movement_list = [movement for movement in context.InvoiceTransaction_zSelectMovement(**search_kw)]\n
+\n
+# update query to search for movements which are children of Trade Model Rule\n
+kw.pop(\'grand_parent_simulation_state\')\n
+kw[\'grand_grand_parent_specialise_portal_type\'] = \'Trade Model Rule\'\n
+kw[\'grand_grand_grand_parent_simulation_state\'] = [\'started\']\n
+\n
+search_kw = kw.copy()\n
+\n
+search_kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
+\n
+trade_model_movement_list = [movement for movement in context.InvoiceTransaction_zSelectMovement(**search_kw)]\n
 \n
 movement_list = [] \n
-for movement in context.InvoiceTransaction_zSelectMovement(**kw) :\n
+for movement in normal_movement_list + trade_model_movement_list:\n
   movement = movement.getObject()\n
   if movement.getDeliveryValue() is None :\n
     movement_list.append(movement)\n
@@ -118,10 +138,15 @@
                             <string>_write_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>search_kw</string>
                             <string>_apply_</string>
-                            <string>movement_list</string>
+                            <string>append</string>
+                            <string>$append0</string>
                             <string>_getiter_</string>
                             <string>movement</string>
+                            <string>normal_movement_list</string>
+                            <string>trade_model_movement_list</string>
+                            <string>movement_list</string>
                             <string>None</string>
                             <string>Products.ERP5Type.Log</string>
                             <string>log</string>

Modified: erp5/trunk/bt5/erp5_invoicing/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/bt/revision?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_invoicing/bt/revision [utf8] Wed Jul  1 17:23:13 2009
@@ -1,1 +1,1 @@
-250
+251

Modified: erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_method_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_method_id_list?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_method_id_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_method_id_list [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,2 @@
+erp5_mysql_innodb/z_related_grand_grand_grand_parent
+erp5_mysql_innodb/z_related_grand_grand_parent_specialise

Modified: erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_related_key_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_related_key_list?rev=27854&r1=27853&r2=27854&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_related_key_list [utf8] (original)
+++ erp5/trunk/bt5/erp5_invoicing/bt/template_catalog_related_key_list [utf8] Wed Jul  1 17:23:13 2009
@@ -1,0 +1,2 @@
+grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_parent
+grand_grand_parent_specialise_portal_type | category,catalog,catalog,catalog/portal_type/z_related_grand_grand_parent_specialise




More information about the Erp5-report mailing list