diff --git a/modules/purchase_trade/lot.py b/modules/purchase_trade/lot.py index 97a6df5..b59fee9 100755 --- a/modules/purchase_trade/lot.py +++ b/modules/purchase_trade/lot.py @@ -1271,6 +1271,11 @@ class LotQt( sstr = SaleStrategy.__table__() AnalyticDimensionAssignment = pool.get('analytic.dimension.assignment') ada = AnalyticDimensionAssignment.__table__() + type = type or 'all' + state = state or 'all' + lot_status = lot_status or 'all' + ps = ps or 'all' + shipping_status = shipping_status or 'all' def date_filter(purchase_date, sale_date): if not asof and not todate: @@ -1997,19 +2002,19 @@ class LotReport( # Unmatch.execute(session_id, {}, 'start') @classmethod - def table_query(cls, context=None): - if context is None: - context = Transaction().context or {} - LotQT = Pool().get('lot.qt') + def table_query(cls, context=None): + if context is None: + context = Transaction().context or {} + LotQT = Pool().get('lot.qt') purchase = context.get('purchase') sale = context.get('sale') shipment = context.get('shipment') product = context.get('product') location = context.get('location') type = context.get('type') - state = context.get('state') - wh = context.get('wh') - mode = context.get('mode') + state = context.get('state') + wh = context.get('wh') + mode = context.get('mode') group = context.get('group') origin = context.get('origin') supplier = context.get('supplier') @@ -2021,6 +2026,13 @@ class LotReport( dimension = context.get('dimension') strategy = context.get('strategy') finished = context.get('finished') + type = type or 'all' + state = state or 'all' + wh = wh or 'all' + group = group or 'by_physic' + origin = origin or 'all' + ps = ps or 'all' + shipping_status = shipping_status or 'all' query = LotQT.getQuery( purchase=purchase, sale=sale,