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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jan 17 18:09:28 CET 2008


Author: jerome
Date: Thu Jan 17 18:09:28 2008
New Revision: 18780

URL: http://svn.erp5.org?rev=18780&view=rev
Log:
Clean up PaymentTransaction_copyInvoiceProperties everything this script was doing can actually be done with movement groups.

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

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml?rev=18780&r1=18779&r2=18780&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/PaymentTransaction_copyInvoiceProperties.xml Thu Jan 17 18:09:28 2008
@@ -65,34 +65,14 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>LOG = lambda msg:context.log("PaymentTransaction_copyInvoiceProperties", msg)\n
-LOG = lambda msg:None\n
+            <value> <string>from Products.ERP5Type.Message import Message\n
 \n
 payment_transaction = context\n
-LOG("start, payment_transaction = %s @ %s"%(payment_transaction, payment_transaction.getPath()))\n
-invoice_transaction = payment_transaction.getCausalityValue()\n
-LOG("invoice_transaction = %s"%invoice_transaction)\n
 \n
-categories = {}\n
-if invoice_transaction.getResourceValue() is not None : \n
-  categories[\'resource\'] = invoice_transaction.getResource()\n
-\n
-LOG("payment_transaction categories = %s" % categories )\n
-payment_transaction.edit(\n
-   ### FIXME: the date must be set on the simulation movement\n
-   start_date   = invoice_transaction.TradeCondition_getDueDate()\n
- , reference    = invoice_transaction.getReference()\n
- , **categories\n
-)\n
-\n
-if payment_transaction.getSimulationState() == "draft": \n
+if payment_transaction.getSimulationState() == "draft":\n
   payment_transaction.portal_workflow.doActionFor(\n
-                                  payment_transaction,\n
-                                  \'plan_action\',\n
-                                  comment="Initialized by Delivery Builder")\n
-  LOG("payment simulation state set to planned")\n
-\n
-LOG("end")\n
+     payment_transaction, \'plan_action\',\n
+     comment=Message(\'erp5_ui\', "Initialized by Delivery Builder"))\n
 </string> </value>
         </item>
         <item>
@@ -135,15 +115,11 @@
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
-                            <string>LOG</string>
+                            <string>Products.ERP5Type.Message</string>
+                            <string>Message</string>
                             <string>context</string>
                             <string>payment_transaction</string>
                             <string>_getattr_</string>
-                            <string>invoice_transaction</string>
-                            <string>categories</string>
-                            <string>None</string>
-                            <string>_write_</string>
-                            <string>_apply_</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=18780&r1=18779&r2=18780&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Thu Jan 17 18:09:28 2008
@@ -1,1 +1,1 @@
-541
+542




More information about the Erp5-report mailing list