[Erp5-report] r11489 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Nov 25 13:04:38 CET 2006
Author: jerome
Date: Sat Nov 25 13:04:25 2006
New Revision: 11489
URL: http://svn.erp5.org?rev=11489&view=rev
Log:
Set the date to now on created payment transactions
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml?rev=11489&r1=11488&r2=11489&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_createRelatedPaymentTransaction.xml Sat Nov 25 13:04:25 2006
@@ -69,12 +69,15 @@
<item>
<key> <string>_body</string> </key>
<value> <string>"""Create a related payment transaction, using the account `node`, the payment\n
-`payment`, and setting the payment mode `payment_mode`.\n
+`payment`, and setting the payment mode `payment_mode`. An optional `date` can\n
+be provided, but by default the transaction is created at the system date.\n
"""\n
+from DateTime import DateTime\n
# translate with Base_translateString which is a bit more robust during activities\n
# because it doesn\'t rely on REQUEST[\'PARENTS\']\n
N_ = context.Base_translateString\n
\n
+date = DateTime()\n
portal = context.getPortalObject()\n
payment_dict = {}\n
is_source = context.AccountingTransaction_isSourceView()\n
@@ -95,8 +98,8 @@
\'utf8\', \'repr\')))),\n
source_section=context.getSourceSection(),\n
destination_section=context.getDestinationSection(),\n
- stop_date=context.getStopDate(),\n
- start_date=context.getStartDate(),\n
+ stop_date=date,\n
+ start_date=date,\n
resource=context.getResource(),\n
causality_value=context,\n
created_by_builder=1, # XXX this prevent init script from creating lines.\n
@@ -164,7 +167,7 @@
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>node, payment_mode, payment, batch_mode=0</string> </value>
+ <value> <string>node, payment_mode, payment, date=None, batch_mode=0</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -184,7 +187,7 @@
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>4</int> </value>
+ <value> <int>5</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
@@ -193,7 +196,9 @@
<string>node</string>
<string>payment_mode</string>
<string>payment</string>
+ <string>date</string>
<string>batch_mode</string>
+ <string>DateTime</string>
<string>_getattr_</string>
<string>context</string>
<string>N_</string>
@@ -223,6 +228,7 @@
<key> <string>func_defaults</string> </key>
<value>
<tuple>
+ <none/>
<int>0</int>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=11489&r1=11488&r2=11489&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Sat Nov 25 13:04:25 2006
@@ -1,1 +1,1 @@
-136
+137
More information about the Erp5-report
mailing list