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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 23 18:33:00 CEST 2009


Author: jerome
Date: Fri Oct 23 18:33:00 2009
New Revision: 29983

URL: http://svn.erp5.org?rev=29983&view=rev
Log:
Support lines where source and destination, source_section and destination_section are the same, they should be included twice

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml?rev=29983&r1=29982&r2=29983&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Movement_getSpecificReference.xml [utf8] Fri Oct 23 18:33:00 2009
@@ -57,9 +57,17 @@
 destination reference.\n
 """\n
 delivery = brain.getObject().getExplanationValue()\n
-if delivery.getSourceSectionUid() == brain.section_uid:\n
-  return delivery.getSourceReference()\n
-return delivery.getDestinationReference()\n
+if brain.section_uid != brain.mirror_section_uid:\n
+  if delivery.getSourceSectionUid() == brain.section_uid:\n
+    return delivery.getSourceReference()\n
+  return delivery.getDestinationReference()\n
+\n
+# If we have a movement which exists for both section uid and mirror section uid,\n
+# we can only guess what reference should be used.\n
+if round(brain.total_quantity - brain.getObject().getQuantity(), 5) == 0:\n
+  return delivery.getDestinationReference()\n
+\n
+return delivery.getSourceReference()\n
 </string> </value>
         </item>
         <item>
@@ -101,6 +109,7 @@
                             <string>kwd</string>
                             <string>_getattr_</string>
                             <string>delivery</string>
+                            <string>round</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml?rev=29983&r1=29982&r2=29983&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Node_getAccountingTransactionList.xml [utf8] Fri Oct 23 18:33:00 2009
@@ -87,6 +87,7 @@
 if not \'parent_portal_type\' in params:\n
   params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
 \n
+\n
 # Create the related accouting line list\n
 new_result  = []\n
 net_balance = 0.0\n
@@ -189,11 +190,13 @@
                    selection_domain=context.portal_selections.getSelectionDomainDictFor(selection_name),\n
                    selection_domain_join_column=\'section_uid\',\n
                    sort_on=sort_on,\n
+                   ignore_group_by=True,\n
                    **params))\n
     return new_result\n
 \n
 if context.portal_selections.getSelectionParamsFor(selection_name).get(\'hide_grouping\'):\n
   params[\'where_expression\'] = \'catalog.grouping_reference is NULL\'\n
+\n
 \n
 # We try not to convert to a list, hence the copy & paste\n
 return portal.portal_simulation.getMovementHistoryList(\n
@@ -203,6 +206,7 @@
                  selection_domain=context.portal_selections.getSelectionDomainDictFor(selection_name),\n
                  selection_domain_join_column=\'section_uid\',\n
                  sort_on=sort_on,\n
+                  ignore_group_by=True,\n
                  **params)\n
 
 

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=29983&r1=29982&r2=29983&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Fri Oct 23 18:33:00 2009
@@ -1,1 +1,1 @@
-1014
+1019




More information about the Erp5-report mailing list