Lots Management

This commit is contained in:
2026-05-09 17:46:48 +02:00
parent 000cf54fbc
commit 28d3400651

View File

@@ -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,