[Erp5-report] r17362 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Nov 2 14:47:24 CET 2007
Author: jerome
Date: Fri Nov 2 14:47:23 2007
New Revision: 17362
URL: http://svn.erp5.org?rev=17362&view=rev
Log:
Get the price currency from the packing list, then from the order if not found on packing list
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InvoiceTransaction_postGenerationActivity.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InvoiceTransaction_postGenerationActivity.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InvoiceTransaction_postGenerationActivity.xml?rev=17362&r1=17361&r2=17362&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InvoiceTransaction_postGenerationActivity.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/InvoiceTransaction_postGenerationActivity.xml Fri Nov 2 14:47:23 2007
@@ -90,14 +90,20 @@
related_packing_list = invoice.getDefaultCausalityValue()\n
#LOG(\'causality %s \' %invoice.getCausalityValueList())\n
\n
-# get a price_currency from the packing list\n
-related_order = related_packing_list.getDefaultCausalityValue()\n
-if related_order is not None:\n
- price_currency = related_order.getPriceCurrency()\n
+# XXX this use of currency is completly bogus, it should be set on simulation movements.\n
+# get a price_currency from the packing list, or the order\n
+price_currency = related_packing_list.getPriceCurrency()\n
+if price_currency:\n
invoice.edit(\n
- resource = price_currency,\n
- price_currency = price_currency,\n
- )\n
+ resource=price_currency,\n
+ price_currency=price_currency,)\n
+else:\n
+ related_order = related_packing_list.getDefaultCausalityValue()\n
+ if related_order is not None:\n
+ price_currency = related_order.getPriceCurrency()\n
+ invoice.edit(\n
+ resource=price_currency,\n
+ price_currency=price_currency,)\n
\n
# copy title, if not updating a new delivery\n
if not invoice.getTitle():\n
@@ -113,6 +119,7 @@
except WorkflowException, e:\n
# The user cannot pass the transition, it\'s OK\n
pass\n
+\n
if invoice.getSimulationState() == \'draft\':\n
# call the workflow method, if the user cannot perform this operation.\n
invoice.plan()\n
@@ -178,9 +185,9 @@
<string>LOG</string>
<string>_getattr_</string>
<string>related_packing_list</string>
+ <string>price_currency</string>
<string>related_order</string>
<string>None</string>
- <string>price_currency</string>
<string>e</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=17362&r1=17361&r2=17362&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Fri Nov 2 14:47:23 2007
@@ -1,1 +1,1 @@
-475
+479
More information about the Erp5-report
mailing list