Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] pms website sale #242

Closed
wants to merge 56 commits into from
Closed

Conversation

robinkeunen
Copy link
Contributor

Hi there,

We'd like to submit this WIP module. It allows to book a room online through the portal. The user first lands on the room list. They can filter by room availability based on dates and add a number of rooms to book.

The flow is then similar to the ecommerce flow : review booking (~basket), add extra info, enter address and proceed to payment.

The flow relies on the booking engine to match the availability computed in the backend. A booking engine is created at each request (might cause performance issues).

The folio is only created when the user clicks on pay. It is then cancelled or confirmed based on the online payment status. The invoice is created if the online payment succeeds.

The module adds the following routes :

  • /ebooking/rooms
  • /room/<model("pms.room.type"):room_type> (path to be fixed)
  • /ebooking/booking
  • /ebooking/booking/extra_info
  • /ebooking/booking/address
  • /ebooking/booking/payment/...

This is still a work in progress, we just showed the MVP to the customer. Comments and advice are welcome.

carmenbianca and others added 30 commits November 2, 2023 17:11
[IMP] pms_website_sale: Show a very basic list of room types

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Filter improvements

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Images

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[REF] pms_website_sale: Use booking engine in controller

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Page for room types

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Load /room page when not logged in

During this work, I also realised that pms.room.type is a product, so I
incorporated that design, which required some subsequent refactoring.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>

[IMP] pms_website_sale: Add important comment

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Input are now required, to avoid user entering only one date an not the
other.

A button has been added to reset the date search.
This commit contains a refactor of the BookingEngineParser.
- Use SESSION_KEY when saving data into session
- Discussion about the add_room_request() method and other method
- Catch error when casting values from the formular
Errors can now be shown in the log file and properly to the user.
On the /rooms page and /booking page
Using URLLookup `model()` does not work for public user as public user
has no specific rights on any object.

Another way to solve it is to give read rights for pblic user. But that
seams dangerous to me as any request made on the website is performed by
public user.
Using `price_total` from the `availability_result` does not work as by
default in the booking.engine wizard the number of selected rooms
(`num_room_selected`) is equal to zero. Therefor the `price_total` is
null.

To solve that we set the amount of room selected to 1 for each rooms
available.

As the booking.engine for the rooms page is not stored this is a
temporary value that will not be used for booking.
@robinkeunen
Copy link
Contributor Author

@robinkeunen robinkeunen force-pushed the 14.0-pms_website_sale branch from bd24457 to 4fd5079 Compare November 3, 2023 14:42
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 21, 2024
@github-actions github-actions bot closed this May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants