Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
erp5
Commits
e2f4550e
Commit
e2f4550e
authored
Jun 02, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue on stock listbox when there is no unit conversion defined.
parent
15cfefa0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_getStockList.xml
...ateItem/portal_skins/erp5_trade/Delivery_getStockList.xml
+14
-5
bt5/erp5_trade/bt/change_log
bt5/erp5_trade/bt/change_log
+3
-0
bt5/erp5_trade/bt/revision
bt5/erp5_trade/bt/revision
+1
-1
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_getStockList.xml
View file @
e2f4550e
...
@@ -64,11 +64,16 @@ def getOrderStr(movement_list, resource_value):\n
...
@@ -64,11 +64,16 @@ def getOrderStr(movement_list, resource_value):\n
order_str += \'%s%.f%s\' % (movement_idx and \', \' or \'\', quantity,\n
order_str += \'%s%.f%s\' % (movement_idx and \', \' or \'\', quantity,\n
quantity_unit_value.getShortTitle())\n
quantity_unit_value.getShortTitle())\n
\n
\n
sum_quantity +
= resource_value.convertQuantity(quantity,\n
converted_quantity
= resource_value.convertQuantity(quantity,\n
movement.getQuantityUnit(),\n
movement.getQuantityUnit(),\n
resource_value.getDefaultQuantityUnit())\n
resource_value.getDefaultQuantityUnit())\n
\n
\n
if movement_idx >
0:\n
if converted_quantity:\n
sum_quantity += converted_quantity\n
\n
if not sum_quantity:\n
return None\n
elif movement_idx >
0:\n
order_str += \' \' + context.Base_translateString(\'(${quantity}${quantity_unit} total)\',\n
order_str += \' \' + context.Base_translateString(\'(${quantity}${quantity_unit} total)\',\n
mapping={\'quantity\': sum_quantity,\n
mapping={\'quantity\': sum_quantity,\n
\'quantity_unit\': resource_value.getShortTitle()})\n
\'quantity_unit\': resource_value.getShortTitle()})\n
...
@@ -110,8 +115,12 @@ if movement_dict:\n
...
@@ -110,8 +115,12 @@ if movement_dict:\n
getAvailableInventory=str,\n
getAvailableInventory=str,\n
inventory=\'\')\n
inventory=\'\')\n
\n
\n
order_dict[movement.getUid()] = getOrderStr([movement], resource_value)\n
line_list.append(temp_movement)\n
line_list.append(temp_movement)\n
order_str = getOrderStr([movement], resource_value)\n
if not order_str:\n
continue\n
\n
order_dict[movement.getUid()] = order_str\n
\n
\n
context.REQUEST.set(\'order_dict\', order_dict)\n
context.REQUEST.set(\'order_dict\', order_dict)\n
\n
\n
...
...
bt5/erp5_trade/bt/change_log
View file @
e2f4550e
2011-06-02 arnaud.fontaine
* Fix issue on stock listbox when there is no unit conversion defined.
2011-05-27 arnaud.fontaine
2011-05-27 arnaud.fontaine
* Fix stock listbox and add a new column 'order'.
* Fix stock listbox and add a new column 'order'.
...
...
bt5/erp5_trade/bt/revision
View file @
e2f4550e
1126
1127
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment