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

[13.0][mig] website_event_snippet_calendar #213

Closed

Conversation

damdam-s
Copy link
Member

superseedes #191

@damdam-s
Copy link
Member Author

@yajo snippet fixed and working

@damdam-s
Copy link
Member Author

added some improvements for the calendar (calendar view and event list) to take care of the filters applied (eg: event category)

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Tested on runbot and it doesn't work:

Peek.12-05-2021.07-50.mp4

Traceback in debug assets mode:

Error:


Traceback:
Error: $(...)[0] is undefined
load_events@http://3482153-213-1b3e23.runbot1-3.odoo-community.org/website_event_snippet_calendar/static/src/js/animation.js:128:25
start@http://3482153-213-1b3e23.runbot1-3.odoo-community.org/website_event_snippet_calendar/static/src/js/animation.js:60:18
OdooClass.extend/</prototype[name]</<@http://3482153-213-1b3e23.runbot1-3.odoo-community.org/web/static/src/js/core/class.js:90:38
attachTo/<@http://3482153-213-1b3e23.runbot1-3.odoo-community.org/web/static/src/js/core/widget.js:207:25

Besides, you have to fix that security hole explained below.

website_event_snippet_calendar/controllers/main.py Outdated Show resolved Hide resolved
Copy link

@MeetKD MeetKD left a comment

Choose a reason for hiding this comment

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

Minor change

website_event_snippet_calendar/controllers/main.py Outdated Show resolved Hide resolved
@damdam-s
Copy link
Member Author

@yajo @MeetKD fixed

@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch from c5ed2e8 to e670dfa Compare May 17, 2021 09:35
@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch 2 times, most recently from 99a11f4 to b1dc256 Compare May 17, 2021 12:08
@damdam-s
Copy link
Member Author

@MeetKD @yajo finally green travis & runbot

Copy link

@MeetKD MeetKD left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

Code looks good, but unfortunately, it still does not work:

Peek.20-05-2021.09-09.mp4

@damdam-s
Copy link
Member Author

@yajo can you please give me the url of the runbot you are using? I managed to make it work on runbot.

Ah BTW, the widget must be placed on the event page ... (that's my usecase at least).
Checking why it doesn't work on other pages

@yajo
Copy link
Member

yajo commented May 20, 2021

can you please give me the url of the runbot you are using?

It's the one you get to when clicking here:

image

@damdam-s
Copy link
Member Author

damdam-s commented Jun 1, 2021

@yajo seems ok now

@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch from 315279e to 84cb798 Compare June 1, 2021 09:30
@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch from 84cb798 to e5c58cf Compare June 10, 2021 06:52
victoralmau and others added 7 commits June 10, 2021 08:54
…list (OCA#101)

Allows the user to display a calendar combined with a list of events.

Includes controllers for such information to be bundled into any page through an `<iframe>`.
Before this patch, the user was getting the Public User's TZ on the
calendar view.

After merged, only the event's timzeone will be used to display dates.

It is, however, affected by odoo/odoo#27179,
which means that there is a possible mismatch between the date used
to search and the one used to display, most likely to be hit when
events have very different timzeones. Added to Known Issues.
Co-Authored-By: Jairo Llopis <Yajo@users.noreply.github.com>
@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch from e5c58cf to 104764e Compare June 10, 2021 06:54
@damdam-s damdam-s force-pushed the 13.0-mig-website_event_snippet_calendar branch from 104764e to db4f817 Compare June 10, 2021 06:58
@ValentinVinagre
Copy link

Hey @damdam-s looks good. Do you think could it be posible to add a filter by event type?

Comment on lines 41 to 45
<<<<<<< HEAD
name = fields.Char(string="Reason", required=True, translate=True)
=======
name = fields.Char("Reason", required=True, translate=True)
>>>>>>> [IMP] : black, isort, prettier
Copy link
Member

Choose a reason for hiding this comment

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

Please fix the conflicts instead of committing this.

@@ -54,12 +55,23 @@ def events_for_day(self, day=None, limit=None):
:param limit int:
How many results to return.
"""

searches = parse_qsl(searches[1:])
Copy link
Member

Choose a reason for hiding this comment

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

This is error-prone. If you do None[1:] you'll get an error.

BTW I think it would be better if the JS client calls this argument directly with an array of results. Passing in a query string as a JSON argument doesn't seem very ergonomic.

Comment on lines +67 to +74
for search in searches:
if search[0] == "type":
try:
value = int(search[1])
except ValueError:
value = 0
if value:
domain.append(("event_type_id", "=", int(search[1])))
Copy link
Member

Choose a reason for hiding this comment

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

If all you're using searches for is for filtering by type, it would be better if the parameter were called type directly and got an int or List[int].

@github-actions
Copy link

github-actions bot commented Feb 6, 2022

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 Feb 6, 2022
@github-actions github-actions bot closed this Mar 13, 2022
@rafaelbn rafaelbn reopened this Mar 13, 2022
@rafaelbn rafaelbn removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 13, 2022
@github-actions
Copy link

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 17, 2022
@github-actions github-actions bot closed this Aug 21, 2022
@Camille0907 Camille0907 mentioned this pull request Dec 16, 2022
16 tasks
@rafaelbn
Copy link
Member

/ocabot migraton website_event_snippet_calendar

@rafaelbn rafaelbn reopened this Dec 17, 2022
@OCA-git-bot
Copy link
Contributor

Hi @rafaelbn. Your command failed:

Invalid command: migraton.

Ocabot commands

  • ocabot merge major|minor|patch|nobump
  • ocabot rebase
  • ocabot migration {MODULE_NAME}

More information

@rafaelbn
Copy link
Member

/ocabot migration website_event_snippet_calendar

@OCA-git-bot
Copy link
Contributor

There's no issue in this repo with the title 'Migration to version 13.0' and the milestone 13.0, so not possible to add the comment.

@rafaelbn
Copy link
Member

Hello @damdam-s , are you going to attend the review is pending?

Hello @Camille0907 are you going to review this PR?

@rafaelbn
Copy link
Member

/ocabot migration website_event_snippet_calendar

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 18, 2022
@github-actions
Copy link

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 23, 2023
@github-actions github-actions bot closed this May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration needs review 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.

None yet