Commit bbedacfa authored by Aurel's avatar Aurel

many order form changes + some fix for fast input

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10774 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 81aed153
...@@ -89,7 +89,8 @@ if resource is None :\n ...@@ -89,7 +89,8 @@ if resource is None :\n
raise AttributeError, \'No currency defined on %s\' % payment\n raise AttributeError, \'No currency defined on %s\' % payment\n
\n \n
# Next, check the balance of the account\n # Next, check the balance of the account\n
account_balance = resource.getFutureInventory(payment=payment, src__=src__)\n # We must specify the resource !\n
account_balance = resource.getFutureInventory(payment=payment, resource=resource.getRelativeUrl(),src__=src__)\n
if src__ :\n if src__ :\n
return account_balance \n return account_balance \n
\n \n
......
...@@ -261,6 +261,12 @@ if listbox is None:\n ...@@ -261,6 +261,12 @@ if listbox is None:\n
currency_dict[\'price\'] = price\n currency_dict[\'price\'] = price\n
total_price += price\n total_price += price\n
line_number += 1\n line_number += 1\n
# set default value for column\n
for counter, column in enumerate(axis_list_dict[\'column\']):\n
col_key = \'column%d\' % (counter + 1)\n
if not currency_dict.has_key(col_key):\n
currency_dict[col_key] = 0\n
currency_dict[\'number_line_to_add\'] = 0\n
listbox.append(currency_dict)\n listbox.append(currency_dict)\n
\n \n
if line_number == 0:\n if line_number == 0:\n
...@@ -272,10 +278,14 @@ if listbox is None:\n ...@@ -272,10 +278,14 @@ if listbox is None:\n
\'cash_status\': cash_status_list[0],\n \'cash_status\': cash_status_list[0],\n
\'variation\': variation_list[0],\n \'variation\': variation_list[0],\n
\'additional_line_number\': 0,\n \'additional_line_number\': 0,\n
\'price\': 0\n \'price\': 0,\n
\'number_line_to_add\': 0\n
}\n }\n
# set default value for column\n
for counter, column in enumerate(axis_list_dict[\'column\']):\n
currency_dict[\'column%d\' % (counter + 1)] = 0\n
listbox.append(currency_dict)\n listbox.append(currency_dict)\n
\n \n
other_parameter_list = (operation_currency, line_portal_type, read_only, column_base_category, use_inventory)\n other_parameter_list = (operation_currency, line_portal_type, read_only, column_base_category, use_inventory)\n
context.Base_updateDialogForm(listbox=listbox\n context.Base_updateDialogForm(listbox=listbox\n
, calculated_price=total_price\n , calculated_price=total_price\n
...@@ -489,6 +499,7 @@ else :\n ...@@ -489,6 +499,7 @@ else :\n
<string>column</string> <string>column</string>
<string>quantity</string> <string>quantity</string>
<string>price</string> <string>price</string>
<string>col_key</string>
<string>other_parameter_list</string> <string>other_parameter_list</string>
<string>_apply_</string> <string>_apply_</string>
<string>other_parameter</string> <string>other_parameter</string>
......
...@@ -95,11 +95,17 @@ base_category_list = (\'emission_letter\', \'cash_status\', \'variation\')\n ...@@ -95,11 +95,17 @@ base_category_list = (\'emission_letter\', \'cash_status\', \'variation\')\n
per_resource_dict = {}\n per_resource_dict = {}\n
\n \n
# remove previous line\n # remove previous line\n
old_line = context.objectValues(portal_type=[line_portal_type,])\n # specific case for monetary issue\n
#context.log("will erease old line", old_line)\n if context.getPortalType() == "Monetary Issue":\n
if len(old_line)>0:\n old_line = [id for id in context.objectIds()]\n
for object_list in old_line:\n if len(old_line)>0:\n
context.deleteContent(object_list.getId())\n for line_id in old_line:\n
context.deleteContent(line_id)\n
else:\n
old_line = [x.getObject().getId() for x in context.objectValues(portal_type=[line_portal_type,])]\n
if len(old_line)>0:\n
for line_id in old_line:\n
context.deleteContent(line_id)\n
\n \n
# get the list of movement we need to create\n # get the list of movement we need to create\n
for line in listbox:\n for line in listbox:\n
...@@ -359,10 +365,14 @@ else:\n ...@@ -359,10 +365,14 @@ else:\n
<string>per_resource_dict</string> <string>per_resource_dict</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>id</string>
<string>old_line</string> <string>old_line</string>
<string>len</string> <string>len</string>
<string>_getiter_</string> <string>line_id</string>
<string>object_list</string> <string>x</string>
<string>line</string> <string>line</string>
<string>xrange</string> <string>xrange</string>
<string>counter</string> <string>counter</string>
...@@ -393,9 +403,7 @@ else:\n ...@@ -393,9 +403,7 @@ else:\n
<string>mapped_value_list</string> <string>mapped_value_list</string>
<string>variation_item</string> <string>variation_item</string>
<string>cell</string> <string>cell</string>
<string>append</string> <string>object_list</string>
<string>$append0</string>
<string>x</string>
<string>request</string> <string>request</string>
<string>redirect_url</string> <string>redirect_url</string>
<string>request_form</string> <string>request_form</string>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,6 +84,12 @@ ...@@ -83,6 +84,12 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,6 +84,12 @@ ...@@ -83,6 +84,12 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,6 +84,12 @@ ...@@ -83,6 +84,12 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -287,7 +287,7 @@ ...@@ -287,7 +287,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site\',), strict_membership = 1, leaf_node=0, user_site=0, current_url=here.getSite(), with_base=0)</string> </value> <value> <string>python:here.Delivery_getVaultItemList(vault_type=(\'site\',), strict_membership = 1, leaf_node=0, user_site=1, current_url=here.getSite(), with_base=0)</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>left</string> <string>left</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -75,12 +76,18 @@ ...@@ -75,12 +76,18 @@
<key> <string>groups</string> </key> <key> <string>groups</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>left</string> </key> <key> <string>left</string> </key>
<value> <value>
<list> <list>
<string>my_vault_report_type</string>
<string>my_vault</string> <string>my_vault</string>
<string>my_vault_report_type</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,6 +84,12 @@ ...@@ -83,6 +84,12 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
<value> <value>
<list> <list>
<string>bottom</string> <string>bottom</string>
<string>hidden</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -83,6 +84,14 @@ ...@@ -83,6 +84,14 @@
</list> </list>
</value> </value>
</item> </item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_total_price</string>
</list>
</value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>getResourceTitle</string> <string>getResourceTranslatedTitle</string>
<string>Denomination</string> <string>Denomination</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -393,7 +393,12 @@ ...@@ -393,7 +393,12 @@
<item> <item>
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>total_price</string>
<string>Amount</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -446,6 +451,10 @@ ...@@ -446,6 +451,10 @@
<list/> <list/>
</value> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -531,7 +540,7 @@ ...@@ -531,7 +540,7 @@
</item> </item>
<item> <item>
<key> <string>selection_name</string> </key> <key> <string>selection_name</string> </key>
<value> <string>folder_selection</string> </value> <value> <string>folder_cash_currency_list_selection</string> </value>
</item> </item>
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
<value> <value>
<list> <list>
<string>Default</string> <string>left</string>
<string>hidden</string> <string>hidden</string>
</list> </list>
</value> </value>
...@@ -77,18 +77,18 @@ ...@@ -77,18 +77,18 @@
<value> <value>
<dictionary> <dictionary>
<item> <item>
<key> <string>Default</string> </key> <key> <string>hidden</string> </key>
<value> <value>
<list> <list/>
<string>my_import_file</string>
<string>my_import_type</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>hidden</string> </key> <key> <string>left</string> </key>
<value> <value>
<list/> <list>
<string>my_import_file</string>
<string>my_import_type</string>
</list>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
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