calendar icon indicating copy to clipboard operation
calendar copied to clipboard

[14.0][ADD] add new module resource_booking_auto_create

Open huguesdk opened this issue 3 years ago • 5 comments

and also add new modules resource_category and resource_category_booking.

this module provides a wizard that allows to select available resources by category to assign to a booking. resource combinations are handled automatically.

this module depends on #80.

huguesdk avatar Feb 10 '23 22:02 huguesdk

Isn't better to add the category concept directly to the resource.booking model (so you can assign combinations or categories), and then adapt the selection code to take that into account?

pedrobaeza avatar Feb 14 '23 07:02 pedrobaeza

@pedrobaeza I think it was written this way to stay compatible with the way of working in resource_booking. If the whole thing could be re-engineered from scratch (or if breaking compatibility is not a problem), it would probably be easier to remove the concept of 'combinations' resource_booking, and instead simply directly store the resource.resources in resource.booking.

Subsequently, you could create modules that introduce the concept of combinations or categories to resource.booking.

Ripping out categories from resource.booking and replacing them with categories without doing the above refactoring seems like a recipe for bugs to me.

carmenbianca avatar Feb 14 '23 10:02 carmenbianca

What I'm thinking is complementary: just a new selector at resource.booking level to select also categories, and take into account all the resources of the combinations or the categories. They are minimal changes.

But as you prefer...

pedrobaeza avatar Feb 14 '23 12:02 pedrobaeza

thanks a lot @carmenbianca for this in-depth review. all the changes you suggested are now made. i also renamed the wizard models to shorter and more understandable names.

huguesdk avatar Feb 18 '23 22:02 huguesdk

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[bot] avatar May 05 '24 12:05 github-actions[bot]