Commit eb6b23e9 authored by Mame Coumba Sall's avatar Mame Coumba Sall

2009-10-02 mame

- add new colon Quantity on Item_viewTrackingList to display quantity of item at movement date

- On Item_view, Origine field shows now source of the first movement in tracking list.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29384 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 87a234a8
...@@ -58,14 +58,21 @@ ...@@ -58,14 +58,21 @@
if at_date is None:\n if at_date is None:\n
at_date = DateTime()\n at_date = DateTime()\n
\n \n
\n
\n
last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n last_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(), at_date=at_date)\n item=context.getRelativeUrl())\n
\n
last_affectation_date_list = [x.getDate() for x in last_affectation_list]\n
last_affectation_date_list.sort()\n
first_affectation_list = context.portal_simulation.getCurrentTrackingList(\n
item=context.getRelativeUrl(),at_date=last_affectation_date_list[0])\n
\n \n
if len(last_affectation_list) == 0:\n if len(last_affectation_list) == 0:\n
return None\n return None\n
\n \n
if last_affectation_list[0].node_uid is not None:\n if first_affectation_list[0].node_uid is not None:\n
site = context.portal_catalog.getObject(last_affectation_list[0].delivery_uid)\n site = context.portal_catalog.getObject(first_affectation_list[0].delivery_uid)\n
return site\n return site\n
\n \n
return None\n return None\n
...@@ -111,8 +118,14 @@ return None\n ...@@ -111,8 +118,14 @@ return None\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>last_affectation_list</string> <string>last_affectation_list</string>
<string>len</string> <string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>last_affectation_date_list</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>first_affectation_list</string>
<string>len</string>
<string>site</string> <string>site</string>
</tuple> </tuple>
</value> </value>
......
...@@ -86,6 +86,7 @@ for res in method(aggregate_uid=uid, **kw):\n ...@@ -86,6 +86,7 @@ for res in method(aggregate_uid=uid, **kw):\n
translated_portal_type = explanation.getTranslatedPortalType(),\n translated_portal_type = explanation.getTranslatedPortalType(),\n
quantity = explanation.getQuantity(),\n quantity = explanation.getQuantity(),\n
url=explanation.absolute_url(),\n url=explanation.absolute_url(),\n
item_quantity = context.getQuantity(at_date=res.getDate()), \n
variation_category_item_list = [x[0] for x in explanation.getVariationCategoryItemList()],\n variation_category_item_list = [x[0] for x in explanation.getVariationCategoryItemList()],\n
simulation_state=explanation.getTranslatedSimulationStateTitle(),\n simulation_state=explanation.getTranslatedSimulationStateTitle(),\n
)\n )\n
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox</string>
<string>listbox_item_quantity</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -120,6 +120,10 @@ ...@@ -120,6 +120,10 @@
<string>simulation_state</string> <string>simulation_state</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple>
<string>item_quantity</string>
<string>Quantity</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
...@@ -135,6 +139,10 @@ ...@@ -135,6 +139,10 @@
<string>variation_category_item_list</string> <string>variation_category_item_list</string>
<string>Variation</string> <string>Variation</string>
</tuple> </tuple>
<tuple>
<string>item_quantity</string>
<string>Quantity</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="FloatField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_item_quantity</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>
<item>
<key> <string>not_float</string> </key>
<value> <string>You did not enter a floating point number.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1234.5</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Quantity</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
180 181
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment