main #7
@@ -206,10 +206,10 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
|
|||||||
swr.wr = wr
|
swr.wr = wr
|
||||||
ShipmentWR.save([swr])
|
ShipmentWR.save([swr])
|
||||||
doc.notes = (doc.notes or "") + f"Shipment found: {sh[0].number}\n"
|
doc.notes = (doc.notes or "") + f"Shipment found: {sh[0].number}\n"
|
||||||
|
logger.info("BL_NUMBER:%s",sh[0].bl_number)
|
||||||
t = Table('freight_booking_lots')
|
t = Table('freight_booking_lots')
|
||||||
cursor = Transaction().connection.cursor()
|
cursor = Transaction().connection.cursor()
|
||||||
cursor.execute(*t.select(
|
query = t.select(
|
||||||
t.BOOKING_NUMBER,
|
t.BOOKING_NUMBER,
|
||||||
t.LOT_NUMBER,
|
t.LOT_NUMBER,
|
||||||
t.LOT_NBR_BALES,
|
t.LOT_NBR_BALES,
|
||||||
@@ -228,9 +228,12 @@ class AutomationDocument(ModelSQL, ModelView, Workflow):
|
|||||||
t.SALE_CONTRACT_NUMBER,
|
t.SALE_CONTRACT_NUMBER,
|
||||||
t.SALE_DECLARATION_KEY,
|
t.SALE_DECLARATION_KEY,
|
||||||
where=(t.BOOKING_NUMBER == sh[0].bl_number)
|
where=(t.BOOKING_NUMBER == sh[0].bl_number)
|
||||||
))
|
)
|
||||||
|
|
||||||
|
cursor.execute(*query)
|
||||||
|
logger.info("QUERY:%s",*query)
|
||||||
rows = cursor.fetchall()
|
rows = cursor.fetchall()
|
||||||
|
logger.info("ROWS:%s",rows)
|
||||||
if rows:
|
if rows:
|
||||||
for row in rows:
|
for row in rows:
|
||||||
#Purchase & Sale creation
|
#Purchase & Sale creation
|
||||||
|
|||||||
Reference in New Issue
Block a user