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

[16.0][ADD] event_seat_reserve #394

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

imlopes
Copy link

@imlopes imlopes commented Jul 25, 2024

Related PR's :

#395

#396

Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

Thanks @imlopes !

I think it might be better for reviewers to split this PR in 3: one per module

event_seat_reserve/models/event_event.py Show resolved Hide resolved
event_seat_reserve/models/event_registration.py Outdated Show resolved Hide resolved
event_seat_reserve/models/event_registration.py Outdated Show resolved Hide resolved
event_seat_reserve/models/event_ticket.py Show resolved Hide resolved
event_seat_reserve/models/event_registration.py Outdated Show resolved Hide resolved
event_sale_seat_reserve/models/sale_order.py Outdated Show resolved Hide resolved
return need_pre_reservation and self.visitor_id

@api.model_create_multi
def create(self, vals_list):
Copy link
Contributor

Choose a reason for hiding this comment

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

need unit tests for an e-commerce flow

@imlopes imlopes force-pushed the 16.0-new-event_seat_reserve branch from 74f765d to 7da3ca5 Compare July 31, 2024 13:09
@imlopes imlopes changed the title [16.0][ADD] event_seat_reserve, event_sale_seat_reserve, website_event_sale_seat_reserve [16.0][ADD] event_seat_reserve Jul 31, 2024
@imlopes imlopes force-pushed the 16.0-new-event_seat_reserve branch 4 times, most recently from feed4c3 to 75897a8 Compare July 31, 2024 15:33
@imlopes imlopes requested a review from ivantodorovich July 31, 2024 15:38
Copy link
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

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

LGTM :) thanks!!

"""Determine reserved, available, reserved but unconfirmed and used seats."""
# initialize fields to 0 + compute seats availability
res = super()._compute_seats()
counts = dict()
Copy link
Contributor

Choose a reason for hiding this comment

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

This compute method is not covered by tests.
Could we add a test to check the seats_reserved_unconfirmed value?

@imlopes imlopes force-pushed the 16.0-new-event_seat_reserve branch from 75897a8 to 0fdb986 Compare August 1, 2024 11:55
adding translation event_seat_reserve
@imlopes imlopes force-pushed the 16.0-new-event_seat_reserve branch from 0fdb986 to 2c23df6 Compare August 1, 2024 12:00
Comment on lines +20 to +24
if config["test_enable"] and not self.env.context.get(
"test_event_seat_reserve"
):
_logger.info("Test mode is enabled, you cannot reserve a registration.")
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need this?

Copy link
Author

Choose a reason for hiding this comment

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

Some tests are failing on the two others PR's because when create a sale, normally the event. registration still on draft state but it's no more the case with these modules. So to avoid failing...

_inherit = "event.event"

seats_reserved_unconfirmed = fields.Integer(
string="Number of Reserved Attendees",

Choose a reason for hiding this comment

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

Suggested change
string="Number of Reserved Attendees",
string="Number of Unconfirmed Reserved Attendees",

Copy link

github-actions bot commented Dec 8, 2024

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 Dec 8, 2024
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants