-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
base: 16.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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
return need_pre_reservation and self.visitor_id | ||
|
||
@api.model_create_multi | ||
def create(self, vals_list): |
There was a problem hiding this comment.
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
74f765d
to
7da3ca5
Compare
feed4c3
to
75897a8
Compare
There was a problem hiding this 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() |
There was a problem hiding this comment.
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?
75897a8
to
0fdb986
Compare
adding translation event_seat_reserve
0fdb986
to
2c23df6
Compare
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string="Number of Reserved Attendees", | |
string="Number of Unconfirmed Reserved Attendees", |
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. |
Related PR's :
#395
#396