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
raise AttributeError, \'No currency defined on %s\' % payment\n
\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
return account_balance \n
\n
......
......@@ -261,6 +261,12 @@ if listbox is None:\n
currency_dict[\'price\'] = price\n
total_price += price\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
\n
if line_number == 0:\n
......@@ -272,10 +278,14 @@ if listbox is None:\n
\'cash_status\': cash_status_list[0],\n
\'variation\': variation_list[0],\n
\'additional_line_number\': 0,\n
\'price\': 0\n
\'price\': 0,\n
\'number_line_to_add\': 0\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
\n
\n
other_parameter_list = (operation_currency, line_portal_type, read_only, column_base_category, use_inventory)\n
context.Base_updateDialogForm(listbox=listbox\n
, calculated_price=total_price\n
......@@ -489,6 +499,7 @@ else :\n
<string>column</string>
<string>quantity</string>
<string>price</string>
<string>col_key</string>
<string>other_parameter_list</string>
<string>_apply_</string>
<string>other_parameter</string>
......
......@@ -95,11 +95,17 @@ base_category_list = (\'emission_letter\', \'cash_status\', \'variation\')\n
per_resource_dict = {}\n
\n
# remove previous line\n
old_line = context.objectValues(portal_type=[line_portal_type,])\n
#context.log("will erease old line", old_line)\n
if len(old_line)>0:\n
for object_list in old_line:\n
context.deleteContent(object_list.getId())\n
# specific case for monetary issue\n
if context.getPortalType() == "Monetary Issue":\n
old_line = [id for id in context.objectIds()]\n
if len(old_line)>0:\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
# get the list of movement we need to create\n
for line in listbox:\n
......@@ -359,10 +365,14 @@ else:\n
<string>per_resource_dict</string>
<string>_getattr_</string>
<string>context</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>id</string>
<string>old_line</string>
<string>len</string>
<string>_getiter_</string>
<string>object_list</string>
<string>line_id</string>
<string>x</string>
<string>line</string>
<string>xrange</string>
<string>counter</string>
......@@ -393,9 +403,7 @@ else:\n
<string>mapped_value_list</string>
<string>variation_item</string>
<string>cell</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>object_list</string>
<string>request</string>
<string>redirect_url</string>
<string>request_form</string>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -76,13 +77,19 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -76,13 +77,19 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -76,13 +77,19 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
......
......@@ -77,7 +77,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......
......@@ -287,7 +287,7 @@
<dictionary>
<item>
<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>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>left</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -75,12 +76,18 @@
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_vault_report_type</string>
<string>my_vault</string>
<string>my_vault_report_type</string>
</list>
</value>
</item>
......
......@@ -77,7 +77,7 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -76,13 +77,19 @@
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
......
......@@ -68,6 +68,7 @@
<value>
<list>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
......@@ -83,6 +84,14 @@
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_total_price</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
......
......@@ -340,7 +340,7 @@
<value>
<list>
<tuple>
<string>getResourceTitle</string>
<string>getResourceTranslatedTitle</string>
<string>Denomination</string>
</tuple>
<tuple>
......@@ -393,7 +393,12 @@
<item>
<key> <string>editable_columns</string> </key>
<value>
<list/>
<list>
<tuple>
<string>total_price</string>
<string>Amount</string>
</tuple>
</list>
</value>
</item>
<item>
......@@ -446,6 +451,10 @@
<list/>
</value>
</item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
......@@ -531,7 +540,7 @@
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>folder_selection</string> </value>
<value> <string>folder_cash_currency_list_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
......
......@@ -67,7 +67,7 @@
<key> <string>group_list</string> </key>
<value>
<list>
<string>Default</string>
<string>left</string>
<string>hidden</string>
</list>
</value>
......@@ -77,18 +77,18 @@
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<key> <string>hidden</string> </key>
<value>
<list>
<string>my_import_file</string>
<string>my_import_type</string>
</list>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>left</string> </key>
<value>
<list/>
<list>
<string>my_import_file</string>
<string>my_import_type</string>
</list>
</value>
</item>
</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