Skip to content

[18.0][MIG] event_sale_reservation: Migration to 18.0#436

Open
BhaveshHeliconia wants to merge 18 commits into
OCA:18.0from
HeliconiaIO:18.0-mig-event_sale_reservation
Open

[18.0][MIG] event_sale_reservation: Migration to 18.0#436
BhaveshHeliconia wants to merge 18 commits into
OCA:18.0from
HeliconiaIO:18.0-mig-event_sale_reservation

Conversation

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

No description provided.

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration event_sale_reservation

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Feb 3, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 3, 2025
23 tasks
@BhaveshHeliconia
BhaveshHeliconia force-pushed the 18.0-mig-event_sale_reservation branch from ee9bcb8 to e23e442 Compare March 31, 2025 05:35
@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

Hey @OCA/crm-sales-marketing-maintainers would be great if someone could have a look at this module.

@FrancoMaxime FrancoMaxime left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM: code review

@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 Jan 18, 2026
@BhaveshHeliconia
BhaveshHeliconia force-pushed the 18.0-mig-event_sale_reservation branch from fe38b34 to f62cc7e Compare January 19, 2026 04:50
@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

Hey @OCA/e-learning-maintainers would be great if someone could have a look at this module.

@etobella etobella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Technical review

_inherit = "product.template"

detailed_type = fields.Selection(
type = fields.Selection(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't be better to use service_tracking?

A migration script might be needed

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’ve updated it as per your suggestion and used service_tracking. Thanks for your suggestion. Kindly please review.

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 25, 2026
@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 Jul 12, 2026
Jairo Llopis and others added 13 commits July 13, 2026 12:49
This module extends the functionality of event_sale to support selling
reservations of events that still don't exist and to allow you to schedule the
creation of events based on how many reservations already exist.

Includes integration workaround to avoid test conflicts with
`event_sale_registration_multi_qty`.

@Tecnativa TT27664

[UPD] Update event_sale_reservation.pot

[UPD] README.rst
TT31321

[UPD] Update event_sale_reservation.pot

[UPD] README.rst
Currently translated at 100.0% (32 of 32 strings)

Translation: event-15.0/event-15.0-event_sale_reservation
Translate-URL: https://translation.odoo-community.org/projects/event-15-0/event-15-0-event_sale_reservation/it/
Currently translated at 100.0% (32 of 32 strings)

Translation: event-15.0/event-15.0-event_sale_reservation
Translate-URL: https://translation.odoo-community.org/projects/event-15-0/event-15-0-event_sale_reservation/it/
Currently translated at 100.0% (32 of 32 strings)

Translation: event-15.0/event-15.0-event_sale_reservation
Translate-URL: https://translation.odoo-community.org/projects/event-15-0/event-15-0-event_sale_reservation/es/
@BhaveshHeliconia
BhaveshHeliconia force-pushed the 18.0-mig-event_sale_reservation branch from b9f2359 to e3b3929 Compare July 13, 2026 07:20
@OCA-git-bot OCA-git-bot added series:18.0 mod:event_sale_reservation Module event_sale_reservation labels Jul 13, 2026
@BhaveshHeliconia

Copy link
Copy Markdown
Contributor Author

ping @etobella

def _onchange_service_tracking_event_reservation(self):
if self.service_tracking == "event_reservation":
self.type = "service"
self.invoice_policy = "order"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

IMHO, this conflicts with _compute_invoice_policy(). You should override that function instead for this field.

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.

Thank you for the review and for raising this point.

I took another look at the implementation, and I believe the current onchange approach is the correct one and does not conflict with _compute_invoice_policy().

My reasoning is as follows:

  1. It follows the Odoo core implementation
    In Odoo 18 (event_sale), _onchange_type_event sets self.invoice_policy = "order" inside an @api.onchange("service_tracking") for the event tracking type. This module follows the same pattern for event_reservation.

  2. There is no runtime conflict with _compute_invoice_policy()
    _compute_invoice_policy() depends only on type, not on service_tracking. Additionally, it only assigns a value when invoice_policy is not already set, so the value assigned by the onchange is preserved and is not overwritten.

  3. The field is intentionally designed to be overridable
    The field is defined as store=True and readonly=False. This is the pattern used by Odoo to provide a computed default while still allowing users or onchange methods to override the value when needed. Moving this logic into a compute override would remove that flexibility and unnecessarily diverge from the core implementation.

For these reasons, I believe it is best to keep the current implementation, as it remains consistent with the Odoo core approach.

@github-actions github-actions Bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:event_sale_reservation Module event_sale_reservation series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.