This commit is contained in:
2026-01-18 20:02:49 +01:00
parent 0d3bfda08c
commit 6b2d5aebf8
5 changed files with 84 additions and 2 deletions

View File

@@ -0,0 +1,43 @@
from trytond.model import ModelSQL, ModelView, fields
class FreightBookingInfo(ModelSQL, ModelView):
"Freight Booking"
__name__ = 'freight.booking'
booking_number = fields.Char("Booking Number")
agent = fields.Char("Agent")
customer = fields.Char("Customer")
origin = fields.Char("Origin")
destination = fields.Char("Destination")
etd = fields.Date("ETD")
eta = fields.Date("ETA")
carrier = fields.Char("Carrier")
vessel = fields.Char("Vessel")
container_count = fields.Integer("Containers")
gross_weight = fields.Float("Gross Weight")
@classmethod
def table_query(cls):
return (
'SELECT '
' ROW_NUMBER() OVER () AS id, '
' booking_number, '
' agent, '
' customer, '
' origin, '
' destination, '
' etd, '
' eta, '
' carrier, '
' vessel, '
' container_count, '
' gross_weight '
'FROM public.freight_booking_info'
)
@classmethod
def __setup__(cls):
super().__setup__()
cls._order = [
('etd', 'DESC'),
]