-
Notifications
You must be signed in to change notification settings - Fork 0
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
Draft: [16.0][ADD] website_event_form #1
base: 16.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but attachment not working, and the dates should have date widget.
if event: | ||
return { | ||
'status': 'success', | ||
'message': _('Event submitted successfully!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently leaves form open and empty. I think it is okay, the event will be ubnpublished anyway.
id="event_start_date" | ||
name="date_begin" | ||
required="required" | ||
placeholder="2024-01-26 02:39:40" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The place holder should be Insert Date - Mandatory : format YYYY-MM-DD HH:MM:SS
Even better.... to avoid formatting errors use type date and odoo widget date.
id="event_end_date" | ||
name="date_end" | ||
required="required" | ||
placeholder="2024-01-26 02:39:40" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The place holder should be Insert Date - Mandatory : format YYYY-MM-DD HH:MM:SS
Even better.... to avoid formatting errors use type date and odoo widget date.
def website_event_process_form(self, **post): | ||
event_obj = request.env['event.event'].sudo() | ||
try: | ||
event = event_obj.create(post) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The attachment does not appear as the photo of the event_photo or as an attachment to the event. it appears to be lost.
|
||
// NB: Save photo file before we submit the form to avoid async | ||
// processes. | ||
document.getElementById('event_photo').addEventListener( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KKamaa the code is fine, but the photo does not appear,.. the object has id=event_photo, but something is not working..
@http.route('/event/process_form', type='json', auth="public", | ||
website=True) | ||
def website_event_process_form(self, **post): | ||
event_obj = request.env['event.event'].sudo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the specs say a calendar.event should be created too.
I asked for some clarifications.... perhaps both?
No description provided.