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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue May 12 11:33:05 CEST 2009


Author: jerome
Date: Tue May 12 11:33:04 2009
New Revision: 26919

URL: http://svn.erp5.org?rev=26919&view=rev
Log:
show editable fields on lines for payment

Added:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox_source_payment.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox_destination_payment.xml
Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getListBoxColumnList.xml [utf8] Tue May 12 11:33:04 2009
@@ -61,9 +61,11 @@
 extra column showing mirror_section_title.\n
 The same for apply for payment / payment_reference.\n
 """\n
+movement_type_list = context.getPortalAccountingMovementTypeList()\n
+\n
 section_dict = {None: 1}\n
 payment_dict = {None: 1}\n
-for line in context.getMovementList():\n
+for line in context.getMovementList(portal_type=movement_type_list):\n
   section_dict[line.getSourceSection()] = 1\n
   section_dict[line.getDestinationSection()] = 1\n
   payment_dict[line.getSourcePayment()] = 1\n
@@ -83,6 +85,23 @@
 \n
 multiple_sections = len(section_dict) > min_section_count\n
 multiple_payment = len(payment_dict) > min_payment_count\n
+\n
+# we also show multiple payments if there is more than one "asset/cash/bank" account\n
+# used on this side.\n
+bank_type_account_count = 0\n
+if not multiple_payment and context.getPortalType() == \'Payment Transaction\':\n
+  for line in context.getMovementList(portal_type=movement_type_list):\n
+    if source:\n
+      account = line.getSourceValue(portal_type=\'Account\')\n
+    else:\n
+      account = line.getDestinationValue(portal_type=\'Account\')\n
+    if account is not None and \\\n
+          account.isMemberOf(\'account_type/asset/cash/bank\'):\n
+      bank_type_account_count += 1\n
+    if bank_type_account_count > 1:\n
+      multiple_payment = 1\n
+      break\n
+\n
 \n
 column_item_list = [(\'translated_id\', \'ID\')]\n
 a = column_item_list.append\n
@@ -96,10 +115,17 @@
   else:\n
     a((\'getSourceSectionTitle\', \'Third Party\'))\n
 if multiple_payment:\n
-  if source:\n
-    a((\'getSourcePaymentReference\', \'Bank Account\'))\n
+  if context.getPortalType() == \'Payment Transaction\':\n
+    if source:\n
+      a((\'source_payment\', \'Bank Account\'))\n
+    else:\n
+      a((\'destination_payment\', \'Bank Account\'))\n
   else:\n
-    a((\'getDestinationPaymentReference\', \'Bank Account\'))\n
+    if source:\n
+      a((\'getSourcePaymentReference\', \'Bank Account\'))\n
+    else:\n
+      a((\'getDestinationPaymentReference\', \'Bank Account\'))\n
+\n
 if source:\n
   a((\'source_debit\', \'Debit\'))\n
   a((\'source_credit\', \'Credit\'))\n
@@ -147,12 +173,13 @@
                         <value>
                           <tuple>
                             <string>source</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>movement_type_list</string>
                             <string>None</string>
                             <string>section_dict</string>
                             <string>payment_dict</string>
                             <string>_getiter_</string>
-                            <string>_getattr_</string>
-                            <string>context</string>
                             <string>line</string>
                             <string>_write_</string>
                             <string>min_payment_count</string>
@@ -160,6 +187,9 @@
                             <string>len</string>
                             <string>multiple_sections</string>
                             <string>multiple_payment</string>
+                            <string>bank_type_account_count</string>
+                            <string>account</string>
+                            <string>_inplacevar_</string>
                             <string>column_item_list</string>
                             <string>a</string>
                           </tuple>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view.xml?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view.xml [utf8] Tue May 12 11:33:04 2009
@@ -85,6 +85,7 @@
                         <string>listbox_source</string>
                         <string>listbox_source_debit</string>
                         <string>listbox_source_credit</string>
+                        <string>listbox_source_payment</string>
                       </list>
                     </value>
                 </item>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox.xml?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox.xml [utf8] Tue May 12 11:33:04 2009
@@ -13,15 +13,15 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>stat_columns</string>
-                <string>editable_columns</string>
-                <string>stat_method</string>
                 <string>title</string>
-                <string>selection_name</string>
                 <string>columns</string>
                 <string>list_method</string>
+                <string>stat_method</string>
+                <string>selection_name</string>
+                <string>portal_types</string>
                 <string>anchor</string>
-                <string>portal_types</string>
+                <string>editable_columns</string>
+                <string>stat_columns</string>
               </list>
             </value>
         </item>
@@ -141,6 +141,10 @@
                           <string>source</string>
                           <string>Account</string>
                         </tuple>
+                        <tuple>
+                          <string>source_payment</string>
+                          <string>Bank Account</string>
+                        </tuple>
                       </list>
                     </value>
                 </item>
@@ -159,6 +163,12 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>portal_types</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
                     <key> <string>selection_name</string> </key>
                     <value> <string>payment_transaction_selection</string> </value>
                 </item>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox_source_payment.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox_source_payment.xml?rev=26919&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox_source_payment.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_view/listbox_source_payment.xml [utf8] Tue May 12 11:33:04 2009
@@ -1,0 +1,132 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>title</string>
+                <string>items</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_source_payment</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>items</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_list_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewAccountingFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>items</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Section Bank Account</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>python:here.AccountingTransaction_getSourcePaymentItemList()</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination.xml?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination.xml [utf8] Tue May 12 11:33:04 2009
@@ -100,6 +100,7 @@
                         <string>my_reference</string>
                         <string>my_resource</string>
                         <string>my_payment_mode</string>
+                        <string>listbox_destination_payment</string>
                       </list>
                     </value>
                 </item>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox.xml?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox.xml [utf8] Tue May 12 11:33:04 2009
@@ -13,15 +13,15 @@
             <key> <string>delegated_list</string> </key>
             <value>
               <list>
-                <string>stat_columns</string>
-                <string>editable_columns</string>
-                <string>stat_method</string>
                 <string>title</string>
-                <string>selection_name</string>
                 <string>columns</string>
                 <string>list_method</string>
+                <string>stat_method</string>
+                <string>selection_name</string>
+                <string>portal_types</string>
                 <string>anchor</string>
-                <string>portal_types</string>
+                <string>editable_columns</string>
+                <string>stat_columns</string>
               </list>
             </value>
         </item>
@@ -141,6 +141,10 @@
                           <string>destination</string>
                           <string>Account</string>
                         </tuple>
+                        <tuple>
+                          <string>destination_payment</string>
+                          <string>Section Bank Account</string>
+                        </tuple>
                       </list>
                     </value>
                 </item>
@@ -159,6 +163,12 @@
                     </value>
                 </item>
                 <item>
+                    <key> <string>portal_types</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
                     <key> <string>selection_name</string> </key>
                     <value> <string>payment_transaction_destination_selection</string> </value>
                 </item>

Added: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox_destination_payment.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox_destination_payment.xml?rev=26919&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox_destination_payment.xml (added)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_viewDestination/listbox_destination_payment.xml [utf8] Tue May 12 11:33:04 2009
@@ -1,0 +1,132 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>delegated_list</string> </key>
+            <value>
+              <list>
+                <string>title</string>
+                <string>items</string>
+              </list>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>listbox_destination_payment</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>items</string> </key>
+                    <value>
+                      <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>field_id</string> </key>
+                    <value> <string>my_list_field</string> </value>
+                </item>
+                <item>
+                    <key> <string>form_id</string> </key>
+                    <value> <string>Base_viewAccountingFieldLibrary</string> </value>
+                </item>
+                <item>
+                    <key> <string>items</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>target</string> </key>
+                    <value> <string>Click to edit the target</string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Section Bank Account</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+  <record id="2" aka="AAAAAAAAAAI=">
+    <pickle>
+      <tuple>
+        <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string>python:here.AccountingTransaction_getDestinationPaymentItemList()</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=26919&r1=26918&r2=26919&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Tue May 12 11:33:04 2009
@@ -1,1 +1,1 @@
-917
+918




More information about the Erp5-report mailing list