CMTP Fix Task
The CMTPFixTask is a Cheval Collection-specific task which applies a workaround for CTMP cancelled bookings in Cheval Maison — The Palm Dubai.
Purpose
- Correct specific bookings that have inconsistent status and dates due to CTMP cancellations.
- Adjust booking dates and monetary values for a list of specific
res_id_ogentries for the affected property.
What it does
- For the target property
Cheval_Maison__The_Palm_Dubaiand a specific list ofres_id_og:- Set
statustochecked_out. - Truncate
check_out_dateto2025-03-25for affected bookings overlapping that cutoff date.
- Set
- For the room-level table (daily room stay rows):
- Remove
room_stay_daterows that fall after the cutoff date for the affected property/res IDs. - Set
room_check_out_dateto2025-03-25where applicable. - Multiply
room_stay_date_rate_net,room_stay_date_fnb_net, androom_stay_date_other_netby4.6to convert GBP → AED.
- Remove
- Writes updated
ProcessedReservationModelandProcessedRoomModelback to the pipeline.
When to use it
- Use
CMTPFixTaskwhen the legacy or current data contains known booking inconsistencies at Cheval Maison The Palm Dubai due to CTMP. Insert it into theProcessingTaskbefore report generation or as needed by the job configuration.
Example Usage
From jobs/chevalcollection_task.py:
processing_task.insert_subtask(
subtask=CMTPFixTask(job_context=job_context, write_to_catalog=False),
after=OperaLegacyMergeTask,
)Models Required
ProcessedReservationModelProcessedRoomModel
Models Provided
ProcessedReservationModelProcessedRoomModel
Important Notes
- This task manipulates a fixed list of
res_id_ogvalues; changes should be reviewed with the owner before modification. - Currency conversion uses a hard-coded multiplier (4.6). If the conversion rate changes, update the task accordingly.
Related Documentation
- ProcessingTask
- OperaLegacyMergeTask
jobs/chevalcollection_task.py(example job)
Last updated on