18.01.26
This commit is contained in:
43
modules/automation/freight_booking.py
Normal file
43
modules/automation/freight_booking.py
Normal 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'),
|
||||
]
|
||||
Reference in New Issue
Block a user