Skip to content

[ADD] .*: improve rental booking and housekeeping management#2131

Closed
dhrs-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-imp-booking-engine-ux-dhrs
Closed

[ADD] .*: improve rental booking and housekeeping management#2131
dhrs-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-imp-booking-engine-ux-dhrs

Conversation

@dhrs-odoo
Copy link
Copy Markdown
Contributor

  • add rental status indicators to quickly identify bookings for today's check-in, ongoing stays, and today's check-out directly from the view
  • remove the default today filter
  • add "Today's Check-In" and "Today's Check-Out" filters in the gantt view
  • add default group by stage on the housekeeping board
  • hide Guests tab and Tax button when no stay offer products are present in the SOL
  • add many2one_avatar widget on x_guest_partner_id field
  • hide the housekeeping section when the resource role is not linked to a stay offer product
  • update demo data so orders with a start date before today and an end date after today are automatically checked in
  • update demo data so orders with an end date before today are automatically checked out

Task-6144429

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 11, 2026

Pull request status dashboard

@dhrs-odoo dhrs-odoo changed the title [ADD] .*: improve rental booking and housekeeping managemen [ADD] .*: improve rental booking and housekeeping management May 11, 2026
@dhrs-odoo dhrs-odoo force-pushed the 19.0-imp-booking-engine-ux-dhrs branch 2 times, most recently from ff5b6c2 to 2d04fba Compare May 12, 2026 09:51
Comment thread holiday_house/demo/sale_order_post.xml
Comment thread booking_engine/data/ir_model_fields.xml
Comment thread booking_engine/data/ir_ui_view.xml Outdated
<field name="active" eval="True"/>
<field name="arch" type="xml">
<xpath expr="//filter[@name='conflict_shifts']" position="before">
<filter string="Today's Check In" name="filter_checkin_today" domain="[('x_rental_status', '=', 'pickup'), ('sale_order_id.rental_start_date', '&gt;=', 'today'), ('sale_order_id.rental_start_date', '&lt;', 'today +1d')]"/>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the spec says we should remove "my customer" filter. Did it drop from spec?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't found that filter I discussed same with Savp

Comment thread booking_engine/data/ir_ui_view.xml Outdated
Comment thread booking_engine/data/ir_model_fields.xml Outdated
@dhrs-odoo dhrs-odoo force-pushed the 19.0-imp-booking-engine-ux-dhrs branch from 2d04fba to 84df82c Compare May 19, 2026 05:44
Comment thread booking_engine/data/ir_ui_view.xml
- add rental status indicators to quickly identify bookings for today's check-in,
  ongoing stays, and today's check-out directly from the view
- remove the default today filter
- add "Today's Check-In" and "Today's Check-Out" filters in the gantt view
- add default group by stage on the housekeeping board
- hide Guests tab and Tax button when no stay offer products are present in the SOL
- add many2one_avatar widget on x_guest_partner_id field
- hide the housekeeping section when the resource role is not linked to a stay
  offer product
- update demo data so orders with a start date before today and an end date after
  today are automatically checked in
- update demo data so orders with an end date before today are automatically
  checked out

Task-6144429
@dhrs-odoo dhrs-odoo force-pushed the 19.0-imp-booking-engine-ux-dhrs branch from 84df82c to f49e8a8 Compare May 20, 2026 06:58
Comment thread booking_engine/data/ir_model_fields.xml
Comment on lines +805 to +816
if not order:
slot['x_booking_color'] = 5 # purple - internal
elif order.rental_status == 'pickup' and order.rental_start_date and today_start <= order.rental_start_date <= today_end:
slot['x_booking_color'] = 3 # yellow - check in due
elif order.rental_status == 'return' and order.rental_return_date and order.rental_return_date > today_end:
slot['x_booking_color'] = 10 # green - ongoing
elif order.rental_status == 'return' and order.rental_return_date and today_start <= order.rental_return_date <= today_end:
slot['x_booking_color'] = 4 # blue - check out due
elif (order.rental_status == 'pickup' and order.is_late) or (order.rental_status == 'return' and order.is_late):
slot['x_booking_color'] = 1 # red - attention
else:
slot['x_booking_color'] = False # grey - no focus
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, feel free to do whatever you want though...

Suggested change
if not order:
slot['x_booking_color'] = 5 # purple - internal
elif order.rental_status == 'pickup' and order.rental_start_date and today_start <= order.rental_start_date <= today_end:
slot['x_booking_color'] = 3 # yellow - check in due
elif order.rental_status == 'return' and order.rental_return_date and order.rental_return_date > today_end:
slot['x_booking_color'] = 10 # green - ongoing
elif order.rental_status == 'return' and order.rental_return_date and today_start <= order.rental_return_date <= today_end:
slot['x_booking_color'] = 4 # blue - check out due
elif (order.rental_status == 'pickup' and order.is_late) or (order.rental_status == 'return' and order.is_late):
slot['x_booking_color'] = 1 # red - attention
else:
slot['x_booking_color'] = False # grey - no focus
slot['x_booking_color'] = False # grey - no focus
if not order: slot['x_booking_color'] = 5 # purple - internal
elif order.rental_status in ['pickup', 'return']:
if order.is_late: slot['x_booking_color'] = 1 # red - attention
elif order.rental_status == 'return':
if order.rental_return_date > today_end:
slot['x_booking_color'] = 10 # green - ongoing
elif order.rental_return_date and today_start <= order.rental_return_date <= today_end:
slot['x_booking_color'] = 4 # blue - check out due
elif order.rental_start_date and today_start <= order.rental_start_date <= today_end:
slot['x_booking_color'] = 3 # yellow - check in due

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please no 🙃

<field name="model_id" ref="planning.model_planning_slot"/>
<field name="name">x_rental_status</field>
<field name="related">sale_order_id.rental_status</field>
<field name="store">False</field>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that really work? 😂

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked, yes 🫠

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's working

Comment on lines +805 to +816
if not order:
slot['x_booking_color'] = 5 # purple - internal
elif order.rental_status == 'pickup' and order.rental_start_date and today_start <= order.rental_start_date <= today_end:
slot['x_booking_color'] = 3 # yellow - check in due
elif order.rental_status == 'return' and order.rental_return_date and order.rental_return_date > today_end:
slot['x_booking_color'] = 10 # green - ongoing
elif order.rental_status == 'return' and order.rental_return_date and today_start <= order.rental_return_date <= today_end:
slot['x_booking_color'] = 4 # blue - check out due
elif (order.rental_status == 'pickup' and order.is_late) or (order.rental_status == 'return' and order.is_late):
slot['x_booking_color'] = 1 # red - attention
else:
slot['x_booking_color'] = False # grey - no focus
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please no 🙃

@vava-odoo
Copy link
Copy Markdown
Collaborator

@robodoo r+ squash

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented May 20, 2026

Merge method set to squash.

@robodoo robodoo closed this in 5e0786c May 20, 2026
robodoo pushed a commit that referenced this pull request May 20, 2026
- add rental status indicators to quickly identify bookings for today's check-in, ongoing stays, and today's check-out directly from the view
- remove the default today filter
- add "Today's Check-In" and "Today's Check-Out" filters in the gantt view
- add default group by stage on the housekeeping board
- hide Guests tab and Tax button when no stay offer products are present in the SOL
- add many2one_avatar widget on x_guest_partner_id field
- hide the housekeeping section when the resource role is not linked to a stay offer product
- update demo data so orders with a start date before today and an end date after today are automatically checked in
- update demo data so orders with an end date before today are automatically checked out

Task-6144429

closes #2192

Forward-port-of: #2131
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants