40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
diff -r fb7f3b05e343 stock.py
|
|
--- a/trytond/trytond/modules/stock_lot_sled/stock.py Mon Apr 23 17:44:40 2018 +0200
|
|
+++ b/trytond/trytond/modules/stock_lot_sled/stock.py Tue Nov 27 11:21:59 2018 +0100
|
|
@@ -229,7 +229,8 @@
|
|
|
|
@classmethod
|
|
def compute_quantities_query(cls, location_ids, with_childs=False,
|
|
- grouping=('product',), grouping_filter=None):
|
|
+ grouping=('product',), grouping_filter=None,
|
|
+ quantity_field='internal_quantity'):
|
|
pool = Pool()
|
|
Date = pool.get('ir.date')
|
|
Lot = pool.get('stock.lot')
|
|
@@ -237,7 +238,24 @@
|
|
|
|
query = super(Move, cls).compute_quantities_query(
|
|
location_ids, with_childs=with_childs, grouping=grouping,
|
|
- grouping_filter=grouping_filter)
|
|
+ grouping_filter=grouping_filter, quantity_field=quantity_field)
|
|
+
|
|
+
|
|
+ return query
|
|
+
|
|
+ # We avoid this part of code, and pass responsability to user to
|
|
+ # remove expired products from stock locations.
|
|
+ # This code had several problems and add inconsitence what you get
|
|
+ # in client and what you get in code
|
|
+ # In client you get all stock
|
|
+ # In code you get all stock without quanities expired
|
|
+ # Code tries to remove all quantities from expired products but
|
|
+ # introduces some issues on stock_supply procedure.
|
|
+ # - he substract all quantities from beginning to start_day,
|
|
+ # every day of planning
|
|
+ # - Even If you do not configure expired quantity, has anormal
|
|
+ # results in stock.
|
|
+
|
|
|
|
context = Transaction().context
|
|
today = Date.today()
|