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
Papa Tamsir Kane
erp5
Commits
bcbbf7b0
Commit
bcbbf7b0
authored
Jun 17, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only take products into account in stock tab on deliveries
We don't show stocks of services
parent
05a31ffa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_getStockList.xml
...ateItem/portal_skins/erp5_trade/Delivery_getStockList.xml
+6
-7
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 @
bcbbf7b0
...
@@ -80,13 +80,14 @@ def getOrderStr(movement_list, resource_value):\n
...
@@ -80,13 +80,14 @@ def getOrderStr(movement_list, resource_value):\n
\n
\n
return order_str\n
return order_str\n
\n
\n
\n
movement_dict = {}\n
movement_dict = {}\n
for movement in context.getMovementList():\n
for movement in context.getMovementList():\n
movement_dict_key = movement.getResourceUid(), tuple(sorted(movement.getVariationCategoryList()
))\n
resource_value = movement.getResourceValue(portal_type=context.getPortalProductTypeList(
))\n
if
movement_dict_key in movement_dict
:\n
if
resource_value is not None
:\n
movement_dict
[movement_dict_key].append(movement
)\n
movement_dict
_key = resource_value.getUid(), tuple(sorted(movement.getVariationCategoryList())
)\n
else:
\n
movement_dict.setdefault(movement_dict_key, []).append(movement)
\n
movement_dict[movement_dict_key] = [movement]
\n
\n
\n
\n
line_list = []\n
line_list = []\n
order_dict = {}\n
order_dict = {}\n
...
@@ -108,8 +109,6 @@ if movement_dict:\n
...
@@ -108,8 +109,6 @@ if movement_dict:\n
for movement_list in movement_dict.values():\n
for movement_list in movement_dict.values():\n
for movement in movement_list:\n
for movement in movement_list:\n
resource_value = movement.getResourceValue()\n
resource_value = movement.getResourceValue()\n
if resource_value is None:\n
continue\n
\n
\n
temp_movement = movement.asContext(getCurrentInventory=str,\n
temp_movement = movement.asContext(getCurrentInventory=str,\n
getAvailableInventory=str,\n
getAvailableInventory=str,\n
...
...
bt5/erp5_trade/bt/revision
View file @
bcbbf7b0
1167
1168
\ 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