Skip to content

[16.0][ADD] event_seat_reserve - #394

Closed
imlopes wants to merge 1 commit into
OCA:16.0from
imlopes:16.0-new-event_seat_reserve
Closed

imlopes wants to merge 1 commit into
OCA:16.0from
imlopes:16.0-new-event_seat_reserve

Conversation

@imlopes

@imlopes imlopes commented Jul 25, 2024 •

Copy link
Copy Markdown

Related PR's :

#395

#396

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown

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

Comment thread event_seat_reserve/models/event_event.py
Comment thread event_seat_reserve/models/event_registration.py Outdated
Comment thread event_seat_reserve/models/event_registration.py Outdated
Comment thread event_seat_reserve/models/event_ticket.py
Comment thread event_seat_reserve/models/event_registration.py Outdated
Comment thread event_sale_seat_reserve/models/sale_order.py Outdated
Comment thread event_sale_seat_reserve/tests/test_event_sale_seat_reserve.py Outdated
Comment thread event_sale_seat_reserve/tests/test_event_sale_seat_reserve.py Outdated
return need_pre_reservation and self.visitor_id

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

Copy link
Copy Markdown

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

Comment thread event_sale_seat_reserve/models/sale_order.py Outdated
Comment thread event_sale_seat_reserve/models/sale_order_line.py Outdated
@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

@ivantodorovich ivantodorovich left a comment

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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",

Copy link
Copy Markdown

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",

@github-actions

github-actions Bot commented Dec 8, 2024

Copy link
Copy Markdown

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
@github-actions

Copy link
Copy Markdown

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 20, 2025
@github-actions github-actions Bot closed this May 25, 2025
@cyrilmanuel

Copy link
Copy Markdown

superseed by #456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 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.

6 participants