Commit 90531030 authored by Aurel's avatar Aurel

many skins and forms modification

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8537 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8c161c60
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Liste des R\xc3\xa9gularisations d\'encaisse</string> </value> <value> <string>Cash Balance Regulations</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>R\xc3\xa9gularisation d\'encaisse</string> </value> <value> <string>Cash Balance Regulation</string> </value>
</item> </item>
<item> <item>
<key> <string>unicode_mode</string> </key> <key> <string>unicode_mode</string> </key>
......
...@@ -308,7 +308,7 @@ ...@@ -308,7 +308,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=\'site/surface\')</string> </value> <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/surface\', \'site/caveau\'))</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -349,7 +349,7 @@ ...@@ -349,7 +349,7 @@
</tuple> </tuple>
<tuple> <tuple>
<string>source_logical_path</string> <string>source_logical_path</string>
<string>Source</string> <string>Vault</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_total_asset_price</string> <string>source_total_asset_price</string>
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<string>Denomination</string> <string>Denomination</string>
</tuple> </tuple>
<tuple> <tuple>
<string>cash_status_title</string> <string>cash_status_translated_title</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple> <tuple>
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<string>Denomination</string> <string>Denomination</string>
</tuple> </tuple>
<tuple> <tuple>
<string>cash_status_title</string> <string>cash_status_translated_title</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple> <tuple>
......
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
<string>Denomination</string> <string>Denomination</string>
</tuple> </tuple>
<tuple> <tuple>
<string>cash_status_title</string> <string>cash_status_translated_title</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple> <tuple>
......
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
<string>Denomination</string> <string>Denomination</string>
</tuple> </tuple>
<tuple> <tuple>
<string>cash_status_title</string> <string>cash_status_translated_title</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple> <tuple>
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
<value> <value>
<list> <list>
<string>listbox_source_logical_path</string> <string>listbox_source_logical_path</string>
<string>listbox_destination_logical_path</string>
<string>listbox_source_total_asset_price</string> <string>listbox_source_total_asset_price</string>
</list> </list>
</value> </value>
......
...@@ -343,11 +343,7 @@ ...@@ -343,11 +343,7 @@
</tuple> </tuple>
<tuple> <tuple>
<string>source_logical_path</string> <string>source_logical_path</string>
<string>Source Vault</string> <string>Vault</string>
</tuple>
<tuple>
<string>destination_logical_path</string>
<string>Destination Vault</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_total_asset_price</string> <string>source_total_asset_price</string>
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Source Vault</string> </value> <value> <string>Vault</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -83,8 +83,8 @@ if currency != context.Baobab_getPortalReferenceCurrencyID():\n ...@@ -83,8 +83,8 @@ if currency != context.Baobab_getPortalReferenceCurrencyID():\n
emission_letter = [\'not_defined\']\n emission_letter = [\'not_defined\']\n
variation = [\'not_defined\']\n variation = [\'not_defined\']\n
else:\n else:\n
cash_status = [\'not_defined\']\n cash_status = None\n
emission_letter = [\'not_defined\']\n emission_letter = None\n
variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n variation = context.Baobab_getResourceVintageList(banknote=1, coin=1)\n
\n \n
cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n cash_detail_dict = {\'line_portal_type\' : \'Cash Delivery Line\'\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
counter_line = 0\n
result = []\n
resultContainer = {}\n
result_line = []\n
\n
def isSameSet(a, b):\n
for i in a:\n
if not(i in b) : return 0\n
for i in b:\n
if not(i in a): return 0\n
if len(a) != len(b) : return 0\n
return 1\n
\n
# remove existing lines\n
old_line = [x.getObject() for x in context.searchFolder(portal_type=[line_portal_type, container_line_portal_type])]\n
if len(old_line)>0:\n
for object_list in old_line:\n
context.deleteContent(object_list.getId())\n
\n
cash_container_item_dict = {}\n
# construct dict of selected container\n
for listbox_line in listbox:\n
if listbox_line[\'selection\']==1:\n
container = context.portal_catalog(uid=listbox_line[\'listbox_key\'])[0].getObject()\n
container_dict = {}\n
container_dict["reference"] = container.getReference()\n
container_dict["range_start"] = container.getCashNumberRangeStart()\n
container_dict["range_stop"] = container.getCashNumberRangeStop()\n
container_lines = container.searchFolder(portal_type=\'Container Line\')\n
if len(container_lines) == 0:\n
context.log("Delivery_saveContainerFastInputLine", "No container line find for cash container %s" %(cash_container.getRelativeUrl(),))\n
continue\n
container_line = container_lines[0].getObject()\n
container_dict["resource"] = container_line.getResourceValue()\n
container_dict["quantity"] = container_line.getQuantity()\n
container_dict["variation_category"] = container_line.getVariationCategoryList()\n
container_dict["base_variation_category"] = container_line.getVariationBaseCategoryList()\n
cash_container_item_dict[container] = container_dict\n
continue\n
\n
context.log("cash_container_item_list", cash_container_item_dict)\n
\n
resource_total_quantity = 0\n
\n
for cash_container in cash_container_item_dict.keys():\n
container_dict = cash_container_item_dict[cash_container]\n
\n
movement_container = context.newContent(portal_type = container_line_portal_type\n
, reindex_object = 1\n
, reference = container_dict[\'reference\']\n
, cash_number_range_start = container_dict[\'range_start\']\n
, cash_number_range_stop = container_dict[\'range_stop\']\n
)\n
movement_container.setAggregateValueList([cash_container,])\n
# create a cash container line\n
container_line = movement_container.newContent(portal_type = \'Container Line\'\n
, reindex_object = 1\n
#, resource_value = container_dict[\'resource\']\n
, quantity = container_dict[\'quantity\']\n
)\n
\n
container_line.setResourceValue(container_dict[\'resource\'])\n
container_line.setVariationCategoryList(container_dict[\'variation_category\'])\n
container_line.updateCellRange(script_id=\'CashDetail_asCellRange\',base_id="movement")\n
for key in container_line.getCellKeyList(base_id=\'movement\'):\n
if isSameSet(key,container_dict[\'variation_category\']):\n
cell = container_line.newCell(*key)\n
cell.setCategoryList(container_dict[\'variation_category\'])\n
cell.setQuantity(container_dict[\'quantity\'])\n
cell.setMappedValuePropertyList([\'quantity\',\'price\'])\n
cell.setMembershipCriterionBaseCategoryList(container_dict[\'base_variation_category\'])\n
cell.setMembershipCriterionCategoryList(container_dict[\'variation_category\'])\n
cell.edit(force_update = 1,\n
price = container_line.getResourceValue().getBasePrice())\n
\n
resource_total_quantity += container_dict[\'quantity\']\n
\n
movement_line = context.newContent(id = "movement"\n
, portal_type = line_portal_type\n
, resource_value = container_dict[\'resource\']\n
, quantity_unit_value = context.portal_categories.quantity_unit.unit\n
)\n
movement_line.setVariationBaseCategoryList(container_dict[\'base_variation_category\'])\n
movement_line.setVariationCategoryList(container_dict[\'variation_category\'])\n
movement_line.updateCellRange(script_id="CashDetail_asCellRange", base_id="movement")\n
for key in movement_line.getCellKeyList(base_id=\'movement\'):\n
if isSameSet(key,container_dict[\'variation_category\']):\n
cell = movement_line.newCell(*key)\n
cell.setCategoryList(container_dict[\'variation_category\'])\n
cell.setQuantity(resource_total_quantity)\n
cell.setMappedValuePropertyList([\'quantity\',\'price\'])\n
cell.setMembershipCriterionBaseCategoryList(container_dict[\'base_variation_category\'])\n
cell.setMembershipCriterionCategoryList(container_dict[\'variation_category\'])\n
cell.edit(force_update = 1,\n
price = movement_line.getResourceValue().getBasePrice())\n
\n
request = context.REQUEST\n
redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
, \'portal_status_message=done\'\n
)\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_cash/Delivery_saveContainerFastInputLine</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=None, line_portal_type=None,container_line_portal_type=None,**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>listbox</string>
<string>line_portal_type</string>
<string>container_line_portal_type</string>
<string>kw</string>
<string>counter_line</string>
<string>result</string>
<string>resultContainer</string>
<string>result_line</string>
<string>isSameSet</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>x</string>
<string>old_line</string>
<string>len</string>
<string>object_list</string>
<string>cash_container_item_dict</string>
<string>listbox_line</string>
<string>_getitem_</string>
<string>container</string>
<string>container_dict</string>
<string>_write_</string>
<string>container_lines</string>
<string>cash_container</string>
<string>container_line</string>
<string>resource_total_quantity</string>
<string>movement_container</string>
<string>key</string>
<string>_apply_</string>
<string>cell</string>
<string>movement_line</string>
<string>request</string>
<string>redirect_url</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_saveContainerFastInputLine</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<value> <value>
<list> <list>
<string>listbox</string> <string>listbox</string>
<string>listbox_source_total_asset_price</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -333,6 +333,10 @@ ...@@ -333,6 +333,10 @@
<string>description</string> <string>description</string>
<string>Description</string> <string>Description</string>
</tuple> </tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Price</string>
</tuple>
<tuple> <tuple>
<string>translated_simulation_state_title</string> <string>translated_simulation_state_title</string>
<string>State</string> <string>State</string>
...@@ -374,6 +378,10 @@ ...@@ -374,6 +378,10 @@
<string>description</string> <string>description</string>
<string>Description</string> <string>Description</string>
</tuple> </tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Price</string>
</tuple>
<tuple> <tuple>
<string>translated_simulation_state_title</string> <string>translated_simulation_state_title</string>
<string>State</string> <string>State</string>
...@@ -432,6 +440,10 @@ ...@@ -432,6 +440,10 @@
<string>delivery.start_date</string> <string>delivery.start_date</string>
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Price</string>
</tuple>
</list> </list>
</value> </value>
</item> </item>
...@@ -536,7 +548,7 @@ ...@@ -536,7 +548,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Monetary Receptions</string> </value> <value> <string>Foreign Cash Receptions</string> </value>
</item> </item>
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
......
...@@ -5,16 +5,22 @@ ...@@ -5,16 +5,22 @@
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.Formulator.StandardFields</string>
<string>StringField</string> <string>FloatField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>my_resource_title</string> </value> <value> <string>listbox_source_total_asset_price</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -25,12 +31,12 @@ ...@@ -25,12 +31,12 @@
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item> <item>
<key> <string>required_not_found</string> </key> <key> <string>not_float</string> </key>
<value> <string>Input is required but no input given.</string> </value> <value> <string>You did not enter a floating point number.</string> </value>
</item> </item>
<item> <item>
<key> <string>too_long</string> </key> <key> <string>required_not_found</string> </key>
<value> <string>Too much input was given.</string> </value> <value> <string>Input is required but no input given.</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -84,23 +90,19 @@ ...@@ -84,23 +90,19 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -159,23 +161,23 @@ ...@@ -159,23 +161,23 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>precision</string> </key>
<value> <string></string> </value> <value>
</item> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<item> </value>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -195,7 +197,7 @@ ...@@ -195,7 +197,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>figure</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -227,14 +229,18 @@ ...@@ -227,14 +229,18 @@
</item> </item>
<item> <item>
<key> <string>extra</string> </key> <key> <string>extra</string> </key>
<value> <string></string> </value> <value> <string>align="right"</string> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string>-1 234.5</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -243,15 +249,7 @@ ...@@ -243,15 +249,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Currency</string> </value> <value> <string>Total Price</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
...@@ -263,4 +261,42 @@ ...@@ -263,4 +261,42 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>string:-1 234.5 | preferences/getPreferredMoneyQuantityStyle</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getResourceValue().getQuantityPrecision()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
<value> <value>
<list> <list>
<string>my_source_reference</string> <string>my_source_reference</string>
<string>my_resource_title</string>
<string>my_destination</string> <string>my_destination</string>
<string>my_resource</string> <string>my_resource</string>
<string>my_source_total_asset_price</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau/devises\'), leaf_node=1,user_site=0)</string> </value> <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getDestination(), vault_type=(\'site/caveau/devises\'), leaf_node=1,user_site=1)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -5,16 +5,22 @@ ...@@ -5,16 +5,22 @@
<tuple> <tuple>
<tuple> <tuple>
<string>Products.Formulator.StandardFields</string> <string>Products.Formulator.StandardFields</string>
<string>StringField</string> <string>FloatField</string>
</tuple> </tuple>
<none/> <none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>listbox_destination_logical_path</string> </value> <value> <string>my_source_total_asset_price</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -25,12 +31,12 @@ ...@@ -25,12 +31,12 @@
<value> <string>The input failed the external validator.</string> </value> <value> <string>The input failed the external validator.</string> </value>
</item> </item>
<item> <item>
<key> <string>required_not_found</string> </key> <key> <string>not_float</string> </key>
<value> <string>Input is required but no input given.</string> </value> <value> <string>You did not enter a floating point number.</string> </value>
</item> </item>
<item> <item>
<key> <string>too_long</string> </key> <key> <string>required_not_found</string> </key>
<value> <string>Too much input was given.</string> </value> <value> <string>Input is required but no input given.</string> </value>
</item> </item>
</dictionary> </dictionary>
</value> </value>
...@@ -84,23 +90,19 @@ ...@@ -84,23 +90,19 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -124,9 +126,7 @@ ...@@ -124,9 +126,7 @@
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
...@@ -161,23 +161,23 @@ ...@@ -161,23 +161,23 @@
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string></string> </value> <value>
</item> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<item> </value>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>precision</string> </key>
<value> <string></string> </value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>required</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>unicode</string> </key> <key> <string>title</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
</item> </item>
<item> <item>
<key> <string>css_class</string> </key> <key> <string>css_class</string> </key>
<value> <string></string> </value> <value> <string>figure</string> </value>
</item> </item>
<item> <item>
<key> <string>default</string> </key> <key> <string>default</string> </key>
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</item> </item>
<item> <item>
<key> <string>editable</string> </key> <key> <string>editable</string> </key>
<value> <int>0</int> </value> <value> <int>1</int> </value>
</item> </item>
<item> <item>
<key> <string>enabled</string> </key> <key> <string>enabled</string> </key>
...@@ -236,7 +236,11 @@ ...@@ -236,7 +236,11 @@
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>max_length</string> </key> <key> <string>input_style</string> </key>
<value> <string>-1234.5</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
...@@ -245,15 +249,7 @@ ...@@ -245,15 +249,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Destination Vault</string> </value> <value> <string>Price</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>whitespace_preserve</string> </key> <key> <string>whitespace_preserve</string> </key>
...@@ -279,7 +275,26 @@ ...@@ -279,7 +275,26 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: here.Baobab_getStrippedPath(object=cell, destination=1)</string> </value> <value> <string>string:-1 234.5 | preferences/getPreferredMoneyQuantityStyle</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getResourceValue().getQuantityPrecision()</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
</tuple> </tuple>
<tuple> <tuple>
<string>source_logical_path</string> <string>source_logical_path</string>
<string>Source Vault</string> <string>Vault</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_total_asset_price</string> <string>source_total_asset_price</string>
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Source Vault</string> </value> <value> <string>Vault</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
<list> <list>
<string>my_source_reference</string> <string>my_source_reference</string>
<string>my_source</string> <string>my_source</string>
<string>my_source_section</string>
<string>my_source_total_asset_price</string> <string>my_source_total_asset_price</string>
</list> </list>
</value> </value>
...@@ -120,7 +121,6 @@ ...@@ -120,7 +121,6 @@
<value> <value>
<list> <list>
<string>my_start_date</string> <string>my_start_date</string>
<string>my_source_section</string>
<string>my_description</string> <string>my_description</string>
</list> </list>
</value> </value>
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), vault_type=(\'site/caveau/serre\',\'site/caveau/externes\',))</string> </value> <value> <string>python:here.Delivery_getVaultItemList(current_url=here.getSource(), owner_site=1, vault_type=(\'site/caveau/serre\',\'site/caveau/externes\',))</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,112 +68,10 @@ ...@@ -68,112 +68,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string>return context.Delivery_saveContainerFastInputLine(listbox=listbox,\n
line_portal_type=\'Monetary Issue Line\',\n
counter_line = 0\n container_line_portal_type=\'Monetary Issue Container\')\n
result = []\n </string> </value>
resultContainer = {}\n
result_line = []\n
\n
def isSameSet(a, b):\n
for i in a:\n
if not(i in b) : return 0\n
for i in b:\n
if not(i in a): return 0\n
if len(a) != len(b) : return 0\n
return 1\n
\n
# remove existing lines\n
old_line = [x.getObject() for x in context.searchFolder(portal_type=[\'Monetary Issue Container\', \'Monetary Issue Line\'])]\n
if len(old_line)>0:\n
for object_list in old_line:\n
context.deleteContent(object_list.getId())\n
\n
cash_container_item_dict = {}\n
# construct dict of selected container\n
for listbox_line in listbox:\n
if listbox_line[\'selection\']==1:\n
container = context.portal_catalog(uid=listbox_line[\'listbox_key\'])[0].getObject()\n
container_dict = {}\n
container_dict["reference"] = container.getReference()\n
container_dict["range_start"] = container.getCashNumberRangeStart()\n
container_dict["range_stop"] = container.getCashNumberRangeStop()\n
container_lines = container.searchFolder(portal_type=\'Container Line\')\n
if len(container_lines) == 0:\n
context.log("MonetaryIssue_generateCashContainerInputDialog", "No container line finf for cash container %s" %(cash_container.getRelativeUrl(),))\n
continue\n
container_line = container_lines[0].getObject()\n
container_dict["resource"] = container_line.getResourceValue()\n
container_dict["quantity"] = container_line.getQuantity()\n
container_dict["variation_category"] = container_line.getVariationCategoryList()\n
container_dict["base_variation_category"] = container_line.getVariationBaseCategoryList()\n
cash_container_item_dict[container] = container_dict\n
continue\n
\n
context.log("cash_container_item_list", cash_container_item_dict)\n
\n
resource_total_quantity = 0\n
\n
for cash_container in cash_container_item_dict.keys():\n
container_dict = cash_container_item_dict[cash_container]\n
\n
movement_container = context.newContent(portal_type = \'Monetary Issue Container\'\n
, reindex_object = 1\n
, reference = container_dict[\'reference\']\n
, cash_number_range_start = container_dict[\'range_start\']\n
, cash_number_range_stop = container_dict[\'range_stop\']\n
)\n
movement_container.setAggregateValueList([cash_container,])\n
# create a cash container line\n
container_line = movement_container.newContent(portal_type = \'Container Line\'\n
, reindex_object = 1\n
#, resource_value = container_dict[\'resource\']\n
, quantity = container_dict[\'quantity\']\n
)\n
\n
container_line.setResourceValue(container_dict[\'resource\'])\n
container_line.setVariationCategoryList(container_dict[\'variation_category\'])\n
container_line.updateCellRange(script_id=\'CashDetail_asCellRange\',base_id="movement")\n
for key in container_line.getCellKeyList(base_id=\'movement\'):\n
if isSameSet(key,container_dict[\'variation_category\']):\n
cell = container_line.newCell(*key)\n
cell.setCategoryList(container_dict[\'variation_category\'])\n
cell.setQuantity(container_dict[\'quantity\'])\n
cell.setMappedValuePropertyList([\'quantity\',\'price\'])\n
cell.setMembershipCriterionBaseCategoryList(container_dict[\'base_variation_category\'])\n
cell.setMembershipCriterionCategoryList(container_dict[\'variation_category\'])\n
cell.edit(force_update = 1,\n
price = container_line.getResourceValue().getBasePrice())\n
\n
resource_total_quantity += container_dict[\'quantity\']\n
\n
movement_line = context.newContent(id = "movement"\n
, portal_type = \'Monetary Issue Line\'\n
, resource_value = container_dict[\'resource\']\n
, quantity_unit_value = context.portal_categories.quantity_unit.unit\n
)\n
movement_line.setVariationBaseCategoryList(container_dict[\'base_variation_category\'])\n
movement_line.setVariationCategoryList(container_dict[\'variation_category\'])\n
movement_line.updateCellRange(script_id="CashDetail_asCellRange", base_id="movement")\n
for key in movement_line.getCellKeyList(base_id=\'movement\'):\n
if isSameSet(key,container_dict[\'variation_category\']):\n
cell = movement_line.newCell(*key)\n
cell.setCategoryList(container_dict[\'variation_category\'])\n
cell.setQuantity(resource_total_quantity)\n
cell.setMappedValuePropertyList([\'quantity\',\'price\'])\n
cell.setMembershipCriterionBaseCategoryList(container_dict[\'base_variation_category\'])\n
cell.setMembershipCriterionCategoryList(container_dict[\'variation_category\'])\n
cell.edit(force_update = 1,\n
price = movement_line.getResourceValue().getBasePrice())\n
\n
request = context.REQUEST\n
redirect_url = \'%s/view?%s\' % ( context.absolute_url()\n
, \'portal_status_message=done\'\n
)\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -227,37 +125,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n ...@@ -227,37 +125,8 @@ request[ \'RESPONSE\' ].redirect( redirect_url )\n
<tuple> <tuple>
<string>listbox</string> <string>listbox</string>
<string>kw</string> <string>kw</string>
<string>counter_line</string>
<string>result</string>
<string>resultContainer</string>
<string>result_line</string>
<string>isSameSet</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>x</string>
<string>old_line</string>
<string>len</string>
<string>object_list</string>
<string>cash_container_item_dict</string>
<string>listbox_line</string>
<string>_getitem_</string>
<string>container</string>
<string>container_dict</string>
<string>_write_</string>
<string>container_lines</string>
<string>cash_container</string>
<string>container_line</string>
<string>resource_total_quantity</string>
<string>movement_container</string>
<string>key</string>
<string>_apply_</string>
<string>cell</string>
<string>movement_line</string>
<string>request</string>
<string>redirect_url</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -102,9 +102,7 @@ ...@@ -102,9 +102,7 @@
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list/>
<string>my_reference</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_reference</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>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was 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>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</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>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</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>0</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Reference</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -312,36 +312,7 @@ ...@@ -312,36 +312,7 @@
<item> <item>
<key> <string>all_columns</string> </key> <key> <string>all_columns</string> </key>
<value> <value>
<list> <list/>
<tuple>
<string>id</string>
<string>ID</string>
</tuple>
<tuple>
<string>source_reference</string>
<string>Reference</string>
</tuple>
<tuple>
<string>delevery.start_date</string>
<string>Date</string>
</tuple>
<tuple>
<string>source_logical_path</string>
<string>Counter</string>
</tuple>
<tuple>
<string>source_total_asset_price</string>
<string>Amount</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>translated_simulation_state_title</string>
<string>State</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -367,12 +338,12 @@ ...@@ -367,12 +338,12 @@
<string>Reference</string> <string>Reference</string>
</tuple> </tuple>
<tuple> <tuple>
<string>delevery.start_date</string> <string>delivery.start_date</string>
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_logical_path</string> <string>source_logical_path</string>
<string>Counter</string> <string>Vault</string>
</tuple> </tuple>
<tuple> <tuple>
<string>source_total_asset_price</string> <string>source_total_asset_price</string>
......
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
</item> </item>
<item> <item>
<key> <string>input_order</string> </key> <key> <string>input_order</string> </key>
<value> <string>ymd</string> </value> <value> <string>mdy</string> </value>
</item> </item>
<item> <item>
<key> <string>input_style</string> </key> <key> <string>input_style</string> </key>
...@@ -295,7 +295,7 @@ ...@@ -295,7 +295,7 @@
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>start_datetime</string> </key> <key> <string>start_datetime</string> </key>
......
...@@ -245,7 +245,7 @@ ...@@ -245,7 +245,7 @@
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Source Vault</string> </value> <value> <string>Vault</string> </value>
</item> </item>
<item> <item>
<key> <string>truncate</string> </key> <key> <string>truncate</string> </key>
......
...@@ -162,9 +162,7 @@ ...@@ -162,9 +162,7 @@
</item> </item>
<item> <item>
<key> <string>precision</string> </key> <key> <string>precision</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -231,11 +229,11 @@ ...@@ -231,11 +229,11 @@
</item> </item>
<item> <item>
<key> <string>input_style</string> </key> <key> <string>input_style</string> </key>
<value> <string>-1 234.5</string> </value> <value> <string>-1234.5</string> </value>
</item> </item>
<item> <item>
<key> <string>precision</string> </key> <key> <string>precision</string> </key>
<value> <string></string> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>required</string> </key> <key> <string>required</string> </key>
...@@ -269,26 +267,7 @@ ...@@ -269,26 +267,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>string:-1 234.5 | preferences/getPreferredMoneyQuantityStyle</string> </value> <value> <string>string: -1 234.5 | preferences/getPreferredMoneyQuantityStyle</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>0</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -97,18 +97,11 @@ def isSameSet(a, b):\n ...@@ -97,18 +97,11 @@ def isSameSet(a, b):\n
\n \n
\n \n
def create_movement(CD_head_dict, CD_line_list):\n def create_movement(CD_head_dict, CD_line_list):\n
## context.log(\'CD_head_dict\',CD_head_dict)\n
## context.log(\'CD_line_list\',CD_line_list)\n
## context.log(\'create_movement on...\',context.getPath())\n
# Head creation\n # Head creation\n
movement_head = context.newContent( portal_type = \'Monetary Reception\'\n movement_head = context.newContent( portal_type = \'Monetary Reception\'\n
, reindex_object = 1\n , reindex_object = 1\n
# , reference = CD_head_dict[\'reference\']\n
# , resource = CD_head_dict[\'currency\'] # done by init script\n
, start_date = CD_head_dict[\'start_date\']\n , start_date = CD_head_dict[\'start_date\']\n
# , emission_letter = CD_head_dict[\'emission_letter\']\n , destination = CD_head_dict[\'destination\']\n
# , cash_status = CD_head_dict[\'cash_status\']\n
# , destination = CD_head_dict[\'destination\']\n
)\n )\n
# Container Creation\n # Container Creation\n
base_list=(\'emission_letter\', \'variation\', \'cash_status\')\n base_list=(\'emission_letter\', \'variation\', \'cash_status\')\n
...@@ -129,12 +122,8 @@ def create_movement(CD_head_dict, CD_line_list):\n ...@@ -129,12 +122,8 @@ def create_movement(CD_head_dict, CD_line_list):\n
, resource_value = CD_head_dict[\'resource\']\n , resource_value = CD_head_dict[\'resource\']\n
, quantity = CD_line[\'quantity\']\n , quantity = CD_line[\'quantity\']\n
)\n )\n
## context.log(\'container_line.getPath()\',container_line.getPath() )\n
## context.log(\'base_list\',base_list)\n
## context.log(\'category_list\',category_list)\n
\n \n
container_line.setResourceValue(CD_head_dict[\'resource\'])\n container_line.setResourceValue(CD_head_dict[\'resource\'])\n
# container_line.setVariationBaseCategoryList(base_list)\n
container_line.setVariationCategoryList(category_list)\n container_line.setVariationCategoryList(category_list)\n
container_line.updateCellRange(script_id=\'CashDetail_asCellRange\',base_id="movement")\n container_line.updateCellRange(script_id=\'CashDetail_asCellRange\',base_id="movement")\n
for key in container_line.getCellKeyList(base_id=\'movement\'):\n for key in container_line.getCellKeyList(base_id=\'movement\'):\n
...@@ -156,8 +145,6 @@ def create_movement(CD_head_dict, CD_line_list):\n ...@@ -156,8 +145,6 @@ def create_movement(CD_head_dict, CD_line_list):\n
, resource_value = CD_head_dict[\'resource\']\n , resource_value = CD_head_dict[\'resource\']\n
, quantity_unit_value = context.portal_categories.quantity_unit.unit\n , quantity_unit_value = context.portal_categories.quantity_unit.unit\n
)\n )\n
#context.log(\'base_list\',base_list)\n
#context.log(\'category_list\',category_list)\n
movement_line.setVariationBaseCategoryList(base_list)\n movement_line.setVariationBaseCategoryList(base_list)\n
movement_line.setVariationCategoryList(category_list)\n movement_line.setVariationCategoryList(category_list)\n
movement_line.updateCellRange(script_id="CashDetail_asCellRange", base_id="movement")\n movement_line.updateCellRange(script_id="CashDetail_asCellRange", base_id="movement")\n
...@@ -171,12 +158,8 @@ def create_movement(CD_head_dict, CD_line_list):\n ...@@ -171,12 +158,8 @@ def create_movement(CD_head_dict, CD_line_list):\n
cell.setMembershipCriterionCategoryList(category_list)\n cell.setMembershipCriterionCategoryList(category_list)\n
cell.edit(force_update = 1,\n cell.edit(force_update = 1,\n
price = movement_line.getResourceValue().getBasePrice())\n price = movement_line.getResourceValue().getBasePrice())\n
# movement_line.setResourceValue(CD_head_dict[\'resource\'])\n
## context.log("movement cell = %r" %(list(movement_line.objectIds(),)), "")\n
# cell = movement_line.getCell(category_list[0], category_list[1], category_list[2])\n
# cell.setQuantity(resouce_total_quantity)\n
\n \n
return {\'error\' : False, \'message\':message_dict[\'00\']+CD_head_dict[\'reference\']}\n return {\'error\' : False, \'message\':message_dict[\'00\']+CD_head_dict[\'reference\'],\'delivery_id\':movement_head.getId()}\n
\n \n
\n \n
def split_head(CD_file_line_list):\n def split_head(CD_file_line_list):\n
...@@ -263,12 +246,19 @@ def split_head(CD_file_line_list):\n ...@@ -263,12 +246,19 @@ def split_head(CD_file_line_list):\n
if head_resource is None:\n if head_resource is None:\n
return {\'error\':True, \'message\':message_dict[\'12\'], \'head_dict\':{}}\n return {\'error\':True, \'message\':message_dict[\'12\'], \'head_dict\':{}}\n
\n \n
# # Destination search\n # Destination search\n
# user_site_list = context.Baobab_getUserAssignedSiteList ()\n user_site_list = context.Baobab_getUserAssignedSiteList()\n
# if user_site_list is None:\n if user_site_list is None:\n
# return {\'error\':True, \'message\':message_dict[\'13\'], \'head_dict\':{}}\n return {\'error\':True, \'message\':message_dict[\'13\'], \'head_dict\':{}}\n
\n \n
# head_destination = user_site_list[0] +\'/caveau/serre/encaisse_des_billets_neufs_non_emis\'\n head_destination = \'%s/%s\' % (user_site_list[0],\'caveau/serre\')\n
if head_emission_letter in context.Baobab_getUserEmissionLetterList():\n
head_destination = \'%s/%s\' % (head_destination,\'encaisse_des_billets_neufs_non_emis\')\n
else:\n
site = context.Baobab_getEmissionLetterSiteValue(emission_letter=head_emission_letter)\n
head_destination = \'%s/%s/%s\' % (head_destination,\n
\'encaisse_des_billets_neufs_non_emis_en_transit_allant_a\',site.getId())\n
context.log(\'head_destination\',head_destination)\n
\n \n
CD_head_dict = {\'reference\' : head_movement_id\n CD_head_dict = {\'reference\' : head_movement_id\n
,\'start_date\' : head_start_date\n ,\'start_date\' : head_start_date\n
...@@ -277,7 +267,7 @@ def split_head(CD_file_line_list):\n ...@@ -277,7 +267,7 @@ def split_head(CD_file_line_list):\n
,\'emission_letter\' : head_emission_letter\n ,\'emission_letter\' : head_emission_letter\n
,\'variation\' : head_variation\n ,\'variation\' : head_variation\n
,\'cash_status\' : \'new_not_emitted\'\n ,\'cash_status\' : \'new_not_emitted\'\n
# ,\'destination\' : head_destination\n ,\'destination\' : head_destination\n
}\n }\n
\n \n
return {\'error\':False, \'message\':None, \'head_dict\':CD_head_dict}\n return {\'error\':False, \'message\':None, \'head_dict\':CD_head_dict}\n
...@@ -324,8 +314,11 @@ def split_lines(CD_file_line_list):\n ...@@ -324,8 +314,11 @@ def split_lines(CD_file_line_list):\n
return {\'error\':True, \'message\':\'Ligne \' + str(line_number) + \' : \' + message_dict[\'08\'],\'lines_dict\':{}}\n return {\'error\':True, \'message\':\'Ligne \' + str(line_number) + \' : \' + message_dict[\'08\'],\'lines_dict\':{}}\n
\n \n
\n \n
def url_redirection(error_message):\n def url_redirection(error_message,delivery_id=None):\n
redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+\'view\', \'portal_status_message=\' + error_message)\n if delivery_id is not None:\n
redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+delivery_id+\'/\'+\'view\', \'portal_status_message=\' + error_message)\n
else:\n
redirect_url = \'%s?%s\' % ( context.absolute_url()+\'/\'+\'view\', \'portal_status_message=\' + error_message)\n
request[ \'RESPONSE\' ].redirect( redirect_url )\n request[ \'RESPONSE\' ].redirect( redirect_url )\n
\n \n
\n \n
...@@ -358,7 +351,7 @@ message_dict = create_movement(CD_head_dict = split_head_result_dict[\'head_dict ...@@ -358,7 +351,7 @@ message_dict = create_movement(CD_head_dict = split_head_result_dict[\'head_dict
if message_dict[\'error\'] :\n if message_dict[\'error\'] :\n
None # Annuler les transactions\n None # Annuler les transactions\n
\n \n
return url_redirection(message_dict[\'message\' ])\n return url_redirection(message_dict[\'message\' ],delivery_id=message_dict[\'delivery_id\'])\n
]]></string> </value> ]]></string> </value>
...@@ -428,6 +421,7 @@ return url_redirection(message_dict[\'message\' ])\n ...@@ -428,6 +421,7 @@ return url_redirection(message_dict[\'message\' ])\n
<string>create_movement</string> <string>create_movement</string>
<string>split_head</string> <string>split_head</string>
<string>split_lines</string> <string>split_lines</string>
<string>None</string>
<string>request</string> <string>request</string>
<string>url_redirection</string> <string>url_redirection</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -436,7 +430,6 @@ return url_redirection(message_dict[\'message\' ])\n ...@@ -436,7 +430,6 @@ return url_redirection(message_dict[\'message\' ])\n
<string>_getitem_</string> <string>_getitem_</string>
<string>split_head_result_dict</string> <string>split_head_result_dict</string>
<string>split_line_result_dict</string> <string>split_line_result_dict</string>
<string>None</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -102,9 +102,7 @@ ...@@ -102,9 +102,7 @@
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list/>
<string>my_reference</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>StringField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_reference</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>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was 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>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</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>max_length</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>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</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>0</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Reference</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -78,8 +78,8 @@ for group, role_list in old_group_list:\n ...@@ -78,8 +78,8 @@ for group, role_list in old_group_list:\n
user = group\n user = group\n
\n \n
site = context.Baobab_getVaultSite(context.getSource()).getRelativeUrl()\n site = context.Baobab_getVaultSite(context.getSource()).getRelativeUrl()\n
\n context.log("user, site", str((user, site)))\n
if context.getCashStatus() == \'to_sort\' or context.getCashStatus() == \'cancelled\' and context.getEmissionLetter() in context.Baobab_getOwnerEmissionLetterList(user):\n if context.getCashStatus() == \'to_sort\' or context.getCashStatus() == \'cancelled\' and context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList(user):\n
# remaining banknote which are not sorted yet, or cancelled one\n # remaining banknote which are not sorted yet, or cancelled one\n
if not \'ventilation\' in context.getSource():\n if not \'ventilation\' in context.getSource():\n
return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(site,)\n return \'%s/caveau/auxiliaire/encaisse_des_billets_et_monnaies\' %(site,)\n
...@@ -87,7 +87,7 @@ if context.getCashStatus() == \'to_sort\' or context.getCashStatus() == \'cancel ...@@ -87,7 +87,7 @@ if context.getCashStatus() == \'to_sort\' or context.getCashStatus() == \'cancel
# take classification into account here\n # take classification into account here\n
source_list = context.getSource().split(\'/\')\n source_list = context.getSource().split(\'/\')\n
return \'%s/caveau/auxiliaire/%s\' %(site,\'/\'.join(source_list[-2:]))\n return \'%s/caveau/auxiliaire/%s\' %(site,\'/\'.join(source_list[-2:]))\n
elif context.getEmissionLetter() in context.Baobab_getOwnerEmissionLetterList(user):\n elif context.getEmissionLetter() in context.Baobab_getUserEmissionLetterList(user):\n
return \'%s/caveau/reserve/encaisse_des_billets_et_monnaies\' %(site,)\n return \'%s/caveau/reserve/encaisse_des_billets_et_monnaies\' %(site,)\n
else:\n else:\n
return \'%s/caveau/externes/encaisse_des_externes\' %(site,)\n return \'%s/caveau/externes/encaisse_des_externes\' %(site,)\n
...@@ -154,6 +154,7 @@ else:\n ...@@ -154,6 +154,7 @@ else:\n
<string>role_list</string> <string>role_list</string>
<string>user</string> <string>user</string>
<string>site</string> <string>site</string>
<string>str</string>
<string>source_list</string> <string>source_list</string>
<string>_getitem_</string> <string>_getitem_</string>
</tuple> </tuple>
......
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