Skip to content
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][IMP] resource_booking: combination_id as filter on calendar view. #141

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

adasatorres
Copy link

Good morning, I would like to add this contribution to the resource_booking as I believe it is quite useful. The modification would allow filtering directly in the calendar view by the combination of resources, adding the combination_id field, similar to how the calendar addon works with contacts.

image

@OCA-git-bot
Copy link
Contributor

Hi @pedrobaeza, @ows-cloud,
some modules you are maintaining are being modified, check this out!

@adasatorres adasatorres changed the title [IMP] resource_booking: Add combination_id how block on calendar view. [16.0][IMP] resource_booking: Add combination_id how block on calendar view. Dec 16, 2024
Copy link

@rrebollo rrebollo left a comment

Choose a reason for hiding this comment

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

Code Review LGTM!

@pedrobaeza pedrobaeza added this to the 16.0 milestone Dec 16, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I don't have clear all the options of the field. Can you clarify them? I see also a lot of noise of adding the contributor just for this tiny change.

@adasatorres adasatorres force-pushed the 16.0-imp-resource_booking branch 3 times, most recently from 9eebf80 to 7b61b31 Compare December 17, 2024 07:31
@adasatorres
Copy link
Author

Good morning, yesterday while reviewing in depth, I found that the development was poorly designed. There were attributes that were unnecessary when modifying the combination_id field in the calendar view. Right now, for the functionality I wanted to implement, it is only necessary to add the attribute filters="1" so that a list appears in the right-hand sidebar to filter by combination_id.

I also reviewed the other attributes since I was curious about what they actually do.

  • write_model: Indicates the model to be modified (this model is solely for storing the filter information).
  • write_field: Indicates the field to be modified (it must exist in the model specified in write_model).
  • filter_field: Indicates whether it is active or not (it must exist in the model specified in write_model).
  • avatar_field: Indicates the field where the image to be used is located (it must exist in the model specified in write_model).

In summary, these attributes provide the necessary information to retrieve the data for the filter widget.

@pedrobaeza

@pedrobaeza
Copy link
Member

Thanks for the extra information. Then please clean the PR only having the filters="1" and removing the rest of the changes.

@adasatorres adasatorres force-pushed the 16.0-imp-resource_booking branch from 7b61b31 to a7af8e5 Compare December 17, 2024 09:00
@adasatorres adasatorres changed the title [16.0][IMP] resource_booking: Add combination_id how block on calendar view. [16.0][IMP] resource_booking: combination_id as filter on calendar view. Dec 17, 2024
@adasatorres
Copy link
Author

@pedrobaeza, Ready.

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-141-by-pedrobaeza-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ab50fdb into OCA:16.0 Dec 17, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 1849674. Thanks a lot for contributing to OCA. ❤️

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

Successfully merging this pull request may close these issues.

4 participants