[Erp5-report] r33751 fabien - in /erp5/trunk/bt5/erp5_pdm: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 16 10:55:45 CET 2010
Author: fabien
Date: Tue Mar 16 10:55:45 2010
New Revision: 33751
URL: http://svn.erp5.org?rev=33751&view=rev
Log:
if ppl have a source, don't take it into account in the report : Transformation report don't depend on the resource provider. If you select a currency in the report dialog, amount in the report will be displayed only if they match this currency or if they don't have any currency.
Added:
erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog/your_price_currency.xml
Modified:
erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getAggregatedAmountList.xml
erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getTotalPrice.xml
erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog.xml
erp5/trunk/bt5/erp5_pdm/bt/revision
Modified: erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getAggregatedAmountList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getAggregatedAmountList.xml?rev=33751&r1=33750&r2=33751&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getAggregatedAmountList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getAggregatedAmountList.xml [utf8] Tue Mar 16 10:55:45 2010
@@ -54,13 +54,21 @@
<item>
<key> <string>_body</string> </key>
<value> <string>request = context.REQUEST\n
-\n
-context.getPortalType()\n
-\n
request.other[\'categories\'] = reference_variation_category_list\n
tmp_context = context.asContext(context=context, REQUEST=request)\n
+price_currency = kw.get(\'price_currency\', None)\n
\n
-return context.getAggregatedAmountList(tmp_context)\n
+result = context.getAggregatedAmountList(tmp_context)\n
+final_result = []\n
+for line in result:\n
+ resource = line.getResourceValue()\n
+ sender_value = None\n
+ if resource is not None:\n
+ sender = line.getResourceValue().getPurchaseSupplyLineSource()\n
+ line.setCategoryMembership(\'source\', sender)\n
+ line.setCategoryMembership(\'price_currency\', price_currency)\n
+\n
+return result\n
</string> </value>
</item>
<item>
@@ -104,6 +112,15 @@
<string>request</string>
<string>_write_</string>
<string>tmp_context</string>
+ <string>None</string>
+ <string>price_currency</string>
+ <string>result</string>
+ <string>final_result</string>
+ <string>_getiter_</string>
+ <string>line</string>
+ <string>resource</string>
+ <string>sender_value</string>
+ <string>sender</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getTotalPrice.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getTotalPrice.xml?rev=33751&r1=33750&r2=33751&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getTotalPrice.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_getTotalPrice.xml [utf8] Tue Mar 16 10:55:45 2010
@@ -59,8 +59,16 @@
request = context.REQUEST\n
request.other[\'categories\'] = reference_variation_category_list\n
tmp_context = context.asContext(context=context, REQUEST=request)\n
+ price_currency = request.get(\'price_currency\', None)\n
\n
aal = context.getAggregatedAmountList(tmp_context)\n
+ for line in aal:\n
+ resource = line.getResourceValue()\n
+ sender_value = None\n
+ if resource is not None:\n
+ sender = line.getResourceValue().getPurchaseSupplyLineSource()\n
+ line.setCategoryMembership(\'source\', sender)\n
+ line.setCategoryMembership(\'price_currency\', price_currency)\n
\n
result = aal.getTotalPrice()\n
return result\n
@@ -114,7 +122,13 @@
<string>request</string>
<string>_write_</string>
<string>tmp_context</string>
+ <string>price_currency</string>
<string>aal</string>
+ <string>_getiter_</string>
+ <string>line</string>
+ <string>resource</string>
+ <string>sender_value</string>
+ <string>sender</string>
<string>result</string>
</tuple>
</value>
Modified: erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog.xml?rev=33751&r1=33750&r2=33751&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog.xml [utf8] Tue Mar 16 10:55:45 2010
@@ -98,6 +98,7 @@
<list>
<string>your_portal_skin</string>
<string>your_format</string>
+ <string>your_price_currency</string>
</list>
</value>
</item>
Added: erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog/your_price_currency.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog/your_price_currency.xml?rev=33751&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog/your_price_currency.xml (added)
+++ erp5/trunk/bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/Transformation_viewGlobalReportDialog/your_price_currency.xml [utf8] Tue Mar 16 10:55:45 2010
@@ -1,0 +1,132 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>delegated_list</string> </key>
+ <value>
+ <list>
+ <string>items</string>
+ <string>title</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>your_price_currency</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>items</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string>your_category</string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string>Base_viewFieldLibrary</string> </value>
+ </item>
+ <item>
+ <key> <string>items</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string>Click to edit the target</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Currency</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>python:here.CurrencyModule_getCurrencyItemList()</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_pdm/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdm/bt/revision?rev=33751&r1=33750&r2=33751&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdm/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_pdm/bt/revision [utf8] Tue Mar 16 10:55:45 2010
@@ -1,1 +1,1 @@
-471
+474
More information about the Erp5-report
mailing list