trytonpsk-hotel/dash.py

67 lines
1.7 KiB
Python
Raw Normal View History

2022-03-16 00:19:31 +01:00
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta
2022-08-29 02:02:36 +02:00
from trytond.modules.dash.dash import DashAppBase
2022-03-16 00:19:31 +01:00
2023-10-09 16:26:54 +02:00
2022-03-16 00:19:31 +01:00
class DashApp(metaclass=PoolMeta):
2022-10-13 22:27:24 +02:00
__name__ = "dash.app"
2022-03-16 00:19:31 +01:00
@classmethod
def _get_origin(cls):
origins = super(DashApp, cls)._get_origin()
2022-10-13 22:27:24 +02:00
origins.extend(
[
"dash.app.hotel_planner",
"dash.app.housekeeping",
"dash.app.web_checkin",
2023-05-24 23:55:30 +02:00
"dash.app.booking",
"dash.app.web_booking",
"dash.app.web_melhous",
2022-10-13 22:27:24 +02:00
]
)
2022-03-16 00:19:31 +01:00
return origins
@classmethod
def get_selection(cls):
options = super(DashApp, cls).get_selection()
2022-10-13 22:27:24 +02:00
options.extend(
[
("hotel_planner", "Planner"),
("housekeeping", "Housekeeping"),
2023-02-20 06:52:28 +01:00
("web_checkin", "Web Checkin"),
2023-05-24 23:55:30 +02:00
("booking", "Booking"),
("web_booking", "Web Booking"),
("web_melhous", "Web Melhous"),
2022-10-13 22:27:24 +02:00
]
)
2022-03-16 00:19:31 +01:00
return options
2022-08-29 02:02:36 +02:00
class AppHotelPlanner(DashAppBase):
2022-10-13 22:27:24 +02:00
"App Hotel Planner"
__name__ = "dash.app.hotel_planner"
2022-03-16 00:19:31 +01:00
2023-10-09 16:26:54 +02:00
2022-08-29 02:02:36 +02:00
class AppHousekeeping(DashAppBase):
2022-10-13 22:27:24 +02:00
"App Housekeeping"
__name__ = "dash.app.housekeeping"
2022-08-31 04:21:22 +02:00
class AppWebCheckIn(DashAppBase):
2022-10-13 22:27:24 +02:00
"App Web Check-In"
__name__ = "dash.app.web_checkin"
2023-05-24 23:55:30 +02:00
2023-10-09 16:26:54 +02:00
2023-05-24 23:55:30 +02:00
class AppBooking(DashAppBase):
"App Booking"
__name__ = "dash.app.booking"
class AppWebBooking(DashAppBase):
"App Web Booking"
__name__ = "dash.app.web_booking"
class AppWebMelHous(DashAppBase):
"App Web Melhous"
__name__ = "dash.app.web_melhous"