From 9daa701a284d3c80e3d1ab9d52616de4f03c8190 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sun, 18 Jan 2026 22:23:09 +0100 Subject: [PATCH] 18.01.26 --- modules/automation/freight_booking.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/automation/freight_booking.py b/modules/automation/freight_booking.py index c291967..0d20691 100644 --- a/modules/automation/freight_booking.py +++ b/modules/automation/freight_booking.py @@ -2,6 +2,8 @@ from trytond.model import ModelSQL, ModelView, fields from sql import Table from sql.functions import CurrentTimestamp from sql import Column, Literal +import logging +logger = logging.getLogger(__name__) class FreightBookingInfo(ModelSQL, ModelView): "Freight Booking" @@ -23,8 +25,8 @@ class FreightBookingInfo(ModelSQL, ModelView): @classmethod def table_query(cls): t = Table('freight_booking_info') - - return t.select( + + query = t.select( Literal(0).as_('create_uid'), CurrentTimestamp().as_('create_date'), Literal(None).as_('write_uid'), @@ -43,6 +45,8 @@ class FreightBookingInfo(ModelSQL, ModelView): Column(t, 'NumberOfContainers').as_('container_count'), Column(t, 'ShippingInstructionQuantity').as_('quantity'), ) + logger.info("*****QUERY*****:%s",query) + return query @classmethod def __setup__(cls):