[Erp5-report] r14594 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu May 24 11:58:10 CEST 2007
Author: jerome
Date: Thu May 24 11:58:09 2007
New Revision: 14594
URL: http://svn.erp5.org?rev=14594&view=rev
Log:
Support a 'simulation_state' parameter in Invoice_getRemainingTotalPayablePrice, all related transaction in other simulation_state that the specified ones will be ignored
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml?rev=14594&r1=14593&r2=14594&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Invoice_getRemainingTotalPayablePrice.xml Thu May 24 11:58:09 2007
@@ -84,9 +84,17 @@
\n
The `account_id` parameter can be use to filter receivable / payable lines to a\n
specific account.\n
+\n
+The `simulation_state` parameter is a list that can be used to take into account\n
+only transactions in those states. By default it will use all but \'draft\', \n
+\'cancelled\' and \'deleted\'.\n
"""\n
portal = context.getPortalObject()\n
total_payable_price_per_node_section = dict()\n
+\n
+if simulation_state is None:\n
+ state_list = [x[0] for x in Base_getTranslatedWorkflowStateItemList()]\n
+ simulation_state = [x for x in state_list if x not in (\'draft\', \'cancelled\', \'deleted\')]\n
\n
if context.AccountingTransaction_isSourceView():\n
is_source = 1\n
@@ -131,8 +139,7 @@
# substract all causalities\n
for related_transaction in context.getCausalityRelatedValueList(\n
portal_type=context.getPortalAccountingTransactionTypeList()):\n
- if related_transaction.getSimulationState() in (\n
- \'draft\', \'cancelled\', \'deleted\'):\n
+ if related_transaction.getSimulationState() not in simulation_state:\n
continue\n
\n
# if we have a payment related to multiple invoices, we cannot say the\n
@@ -212,7 +219,7 @@
</item>
<item>
<key> <string>_params</string> </key>
- <value> <string>detailed=0, at_date=None, account_id=None</string> </value>
+ <value> <string>detailed=0, at_date=None, account_id=None, simulation_state=None</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
@@ -232,7 +239,7 @@
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
- <value> <int>3</int> </value>
+ <value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
@@ -241,17 +248,24 @@
<string>detailed</string>
<string>at_date</string>
<string>account_id</string>
+ <string>simulation_state</string>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>dict</string>
<string>total_payable_price_per_node_section</string>
+ <string>None</string>
+ <string>append</string>
+ <string>$append0</string>
+ <string>_getiter_</string>
+ <string>Base_getTranslatedWorkflowStateItemList</string>
+ <string>x</string>
+ <string>_getitem_</string>
+ <string>state_list</string>
<string>is_source</string>
<string>section</string>
<string>accounts_in_context</string>
- <string>_getiter_</string>
<string>line</string>
- <string>None</string>
<string>node_value</string>
<string>line_section</string>
<string>mirror_section</string>
@@ -259,8 +273,6 @@
<string>key</string>
<string>_write_</string>
<string>related_transaction</string>
- <string>append</string>
- <string>$append0</string>
<string>tr</string>
<string>other_invoice</string>
<string>other_invoice_is_source</string>
@@ -285,6 +297,7 @@
<int>0</int>
<none/>
<none/>
+ <none/>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=14594&r1=14593&r2=14594&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Thu May 24 11:58:09 2007
@@ -1,1 +1,1 @@
-310
+311
More information about the Erp5-report
mailing list