[Erp5-report] r13066 - in /erp5/trunk/bt5/erp5_accounting_l10n_fr_m9: SkinTemplateItem/port...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Feb 27 10:07:43 CET 2007


Author: jerome
Date: Tue Feb 27 10:07:37 2007
New Revision: 13066

URL: http://svn.erp5.org?rev=13066&view=rev
Log:
AccountingTransactionModule_setGroupingReference:
 * stay on the form after grouping
 * reset selection when grouping is successful
 * fix operator priority problem that failed when
    getDestinationInventoriatedTotalAssetPrice returns None
 

Modified:
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_setGroupingReference.xml
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_setGroupingReference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_setGroupingReference.xml?rev=13066&r1=13065&r2=13066&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_setGroupingReference.xml (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_setGroupingReference.xml Tue Feb 27 10:07:37 2007
@@ -68,7 +68,8 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>"""\n
+            <value> <string>"""Set grouping reference for selected lines.\n
+Used as a fast input dialog action.\n
 """\n
 from ZTUtils import make_query\n
 from ZODB.POSException import ConflictError\n
@@ -76,8 +77,8 @@
 getobject = portal.portal_catalog.getobject\n
 N_ = portal.Base_translateString\n
 psm = N_(\'Nothing matches\')\n
+reset = 0\n
 precision = context.REQUEST.get(\'precision\', 2)\n
-\n
 \n
 # XXX when should it be validated ?\n
 if node == \'\':\n
@@ -108,9 +109,9 @@
     for uid in uids:\n
       line = getobject(uid)\n
       if line.AccountingTransaction_isSourceView(): # XXX not optimal !\n
-        total_selected_amount += line.getSourceInventoriatedTotalAssetPrice() or 0\n
+        total_selected_amount += (line.getSourceInventoriatedTotalAssetPrice() or 0)\n
       else:\n
-        total_selected_amount += line.getDestinationInventoriatedTotalAssetPrice() or 0\n
+        total_selected_amount += (line.getDestinationInventoriatedTotalAssetPrice() or 0)\n
         \n
   psm = N_(\'Updated\')\n
   return context.REQUEST.RESPONSE.redirect(\n
@@ -130,7 +131,8 @@
   if grouped_line_list:\n
     psm = N_(\'${grouped_line_count} grouped.\',\n
           mapping=dict(grouped_line_count=len(grouped_line_list)))\n
-    \n
+    reset = 1\n
+\n
     # we check if we can mark some transaction as payed.\n
     transaction_list = {}\n
     for line in grouped_line_list:\n
@@ -175,12 +177,12 @@
       key = (line.getSource(), line.getDestinationSection())\n
       amount = amount_per_node_mirror_section.get(key, 0)\n
       amount_per_node_mirror_section[key] = amount +\\\n
-                          line.getSourceInventoriatedTotalAssetPrice() or 0\n
+                          (line.getSourceInventoriatedTotalAssetPrice() or 0)\n
     else:\n
       key = (line.getDestination(), line.getSourceSection())\n
       amount = amount_per_node_mirror_section.get(key, 0)\n
       amount_per_node_mirror_section[key] = amount +\\\n
-                      line.getDestinationInventoriatedTotalAssetPrice() or 0\n
+                     (line.getDestinationInventoriatedTotalAssetPrice() or 0)\n
   \n
   valid = 1\n
   for node_mirror_section, amount in amount_per_node_mirror_section.items():\n
@@ -196,6 +198,7 @@
   if valid:\n
     psm = N_(\'${ungrouped_line_count} ungrouped.\',\n
           mapping=dict(ungrouped_line_count=len(uids)))\n
+    reset = 1\n
     for line in line_list:\n
       line.AccountingTransactionLine_setGroupingReference(None)\n
   else:\n
@@ -208,6 +211,7 @@
                           grouping=grouping,\n
                           mirror_section=mirror_section,\n
                           cancel_url=cancel_url,\n
+                          reset=reset,\n
                           portal_status_message=psm))))\n
 </string> </value>
         </item>
@@ -277,6 +281,7 @@
                             <string>getobject</string>
                             <string>N_</string>
                             <string>psm</string>
+                            <string>reset</string>
                             <string>precision</string>
                             <string>dict</string>
                             <string>total_selected_amount</string>

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision?rev=13066&r1=13065&r2=13066&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision Tue Feb 27 10:07:37 2007
@@ -1,1 +1,1 @@
-79
+80




More information about the Erp5-report mailing list