merge
This commit is contained in:
commit
f3333ca28d
4 files changed
+26
-9
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Added stock_destinations keyword on products_by_location context to
|
||||
filter moves to a set of destinations.
|
||||
* Allow egg installation
|
||||
|
||||
Version 1.0.0 - 2008-11-17
|
||||
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
Stock Module
|
||||
############
|
||||
|
||||
The stock module define fundamental for all stock management
|
||||
stations: Locations where product are stored, move between these
|
||||
locations, packings for product arrivals and departures and inventory to
|
||||
control and update stock levels.
|
||||
The stock module define fundamentals for all stock management
|
||||
situations: Locations where product are stored, move between these
|
||||
locations, packings for product arrivals and departures and inventory
|
||||
to control and update stock levels.
|
||||
|
||||
Location
|
||||
********
|
||||
|
||||
+1
-1
@@ -282,7 +282,7 @@ InventoryLine()
|
||||
|
||||
|
||||
class CompleteInventory(Wizard):
|
||||
'Complete Inventory '
|
||||
'Complete Inventory'
|
||||
_name = 'stock.inventory.complete'
|
||||
states = {
|
||||
'init': {
|
||||
|
||||
+19
-4
@@ -263,6 +263,20 @@ class Product(OSV):
|
||||
",".join(["%s" for i in product_ids]) + ")"
|
||||
where_vals += product_ids
|
||||
|
||||
if context.get('stock_destinations'):
|
||||
destinations = context.get('stock_destinations')
|
||||
dest_clause_from = " AND from_location in ("
|
||||
dest_clause_from += ",".join("%s" for i in destinations)
|
||||
dest_clause_from += ") "
|
||||
dest_clause_to = " AND to_location in ("
|
||||
dest_clause_to += ",".join("%s" for i in destinations)
|
||||
dest_clause_to += ") "
|
||||
dest_vals = destinations
|
||||
|
||||
else:
|
||||
dest_clause_from = dest_clause_to =""
|
||||
dest_vals = []
|
||||
|
||||
select_clause = \
|
||||
"SELECT location, product, uom, sum(quantity) AS quantity "\
|
||||
"FROM ( "\
|
||||
@@ -281,10 +295,11 @@ class Product(OSV):
|
||||
"GROUP BY from_location, product, uom "\
|
||||
") AS T GROUP BY T.location, T.product, T.uom"
|
||||
|
||||
cursor.execute(select_clause % (state_date_clause, where_clause,
|
||||
state_date_clause, where_clause),
|
||||
state_date_vals + where_vals + \
|
||||
state_date_vals + where_vals)
|
||||
cursor.execute(select_clause % (
|
||||
state_date_clause, where_clause + dest_clause_from,
|
||||
state_date_clause, where_clause + dest_clause_to),
|
||||
state_date_vals + where_vals + dest_vals + \
|
||||
state_date_vals + where_vals + dest_vals)
|
||||
raw_lines = cursor.fetchall()
|
||||
|
||||
res = {}
|
||||
|
||||
Reference in new issue
Block a user