Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
693043f4
Commit
693043f4
authored
Jun 02, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix quantity unit conversion on ProductionOrder_viewMaterialConsumption.
parent
e2f4550e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_getConsumptionMovementList.xml
...s/erp5_mrp/ProductionOrder_getConsumptionMovementList.xml
+10
-9
bt5/erp5_mrp/bt/change_log
bt5/erp5_mrp/bt/change_log
+3
-0
bt5/erp5_mrp/bt/revision
bt5/erp5_mrp/bt/revision
+1
-1
No files found.
bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrder_getConsumptionMovementList.xml
View file @
693043f4
...
...
@@ -78,7 +78,6 @@ for inventory in context.portal_simulation.getFutureInventoryList(*args,**kwargs
result_list = inventory_dict.values()\n
consumption_dict = {}\n
for movement in context.getMovementList():\n
movement_quantity_unit = movement.getQuantityUnit()\n
movement_quantity = movement.getQuantity()\n
movement_destination = movement.getDestination()\n
\n
...
...
@@ -90,22 +89,24 @@ for movement in context.getMovementList():\n
inventory_dict_key = material_resource_uid, \\\n
tuple(sorted(material.getVariationCategoryList())), \\\n
movement_destination\n
\n
quantity = material.getQuantity()\n
\n
try:\n
obj = inventory_dict[inventory_dict_key]\n
except KeyError:\n
obj = material\n
result_list.append(obj)\n
\n
material_quantity_unit = material.getQuantityUnit()\n
if movement_quantity_unit == material_quantity_unit:\n
quantity = material.getQuantity()\n
else:\n
quantity = material.getResourceValue().convertQuantity(material.getQuantity(),\n
material_quantity_unit,\n
movement_quantity_unit)\n
inventory_quantity_unit = obj.getQuantityUnit()\n
quantity_unit = material.getQuantityUnit()\n
if quantity_unit != inventory_quantity_unit:\n
quantity = material.getResourceValue().convertQuantity(quantity,\n
quantity_unit,\n
inventory_quantity_unit)\n
\n
consumption_dict[obj.getUid()] = quantity * movement_quantity\n
if quantity:\n
consumption_dict[obj.getUid()] = quantity * movement_quantity\n
\n
context.REQUEST.set(\'consumption_dict\', consumption_dict)\n
return result_list\n
...
...
bt5/erp5_mrp/bt/change_log
View file @
693043f4
2011-06-02 arnaud.fontaine
* Fix quantity unit conversion on ProductionOrder_viewMaterialConsumption.
2011-06-01 arnaud.fontaine
* Fix ProductionOrder_viewMaterialConsumption and display materials even when not in the inventory.
...
...
bt5/erp5_mrp/bt/revision
View file @
693043f4
460
\ No newline at end of file
461
\ 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