OCA / calendar

GNU Affero General Public License v3.0
24 stars 95 forks source link

[14.0][ADD] new module resource_booking_number_of_attendees #81

Closed huguesdk closed 5 months ago

huguesdk commented 1 year ago

this module only adds an integer field to resource bookings to store the number of attendees (independently of odoo meeting attendees). it can be useful for the organizer of bookings that involves groups of people to know the amount of (unmanaged) material should be prepared.

pedrobaeza commented 1 year ago

Why not including all the attendees in the booking instead (res.partner)?

carmenbianca commented 1 year ago

@pedrobaeza I think the partners may not exist. If Jane Doe makes a booking for a training and says that she will show up with 4 people, then 3 of those people are not known to the people providing the training.

pedrobaeza commented 1 year ago

Yeah, that's possible. Then this can be part also of the main module, and having this field as computed writable, being automatically incremented for the combination + attendees (if switched to m2m instead of m2o).

huguesdk commented 1 year ago

i’m not sure i understand exactly what you mean. do you mean to:

  1. add this field on calendar.event (and a related field on the booking)
  2. compute it from both:
    1. the number of attendees of the event (partner_ids)
    2. the number of human resources of the combination
  3. have this field writable so the value can be set manually as well

which m2o relationship would you change to m2m? resource.booking.partner_id?

what to do in case the attendees change? should the possibly manual value be dropped and replaced by the computed value, or should a difference be computed?

do you think it is useful to take the human resources of the combination into account?

github-actions[bot] commented 6 months ago

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.