remove part of stock_lot_sled patch

This commit is contained in:
?ngel ?lvarez 2019-05-06 23:43:53 +02:00
parent 18f1d7c38c
commit bf2dc119fd
1 changed files with 6 additions and 23 deletions

View File

@ -1,7 +1,7 @@
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 @@
diff -r 0d630a58366a stock.py
--- a/trytond/trytond/modules/stock_lot_sled/stock.py Wed May 01 18:05:26 2019 +0200
+++ b/trytond/trytond/modules/stock_lot_sled/stock.py Mon May 06 23:42:38 2019 +0200
@@ -221,7 +221,8 @@
@classmethod
def compute_quantities_query(cls, location_ids, with_childs=False,
@ -11,29 +11,12 @@ diff -r fb7f3b05e343 stock.py
pool = Pool()
Date = pool.get('ir.date')
Lot = pool.get('stock.lot')
@@ -237,7 +238,24 @@
@@ -229,7 +230,7 @@
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.
+
+ grouping_filter=grouping_filter, quantity_field='internal_quantity')
context = Transaction().context
today = Date.today()