This commit improves the event creation flow in frontend. Before, you could
only set the name of an event and remaining values had to be set either via
backend or using editor for some fields.
Now you can set the name, start / end date and the address if needed.
Task-2488019
PR odoo/odoo#68901
changed the start/end date fields to datetime fields, in order to allow more
flexibility for the user and enable them to set a precise point in time at
which ticket sales should start/end, because otherwise ticket sales/end would
always be set at midnight which is not very flexible.
Task-2431440
closesodoo/odoo#65133
Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Create event registrations in batch. It will allow to customize group-creation
of registrations, notably with automated rules for crm / event synchronization.
SPECIFICATIONS
Instead of creating registrations one by one when processing registration
form details, simply batch-ize their creation.
Instead of creating registrations one by one when adding a new line in cart
simply let website_event handle its job, or the confirmation action of a
sale order that already populates registrations.
Creating registrations when adding a cart line has no real use as we have
no specific information to create that registration. It is better to let
the flow finish and create additional registrations in batch once SO is
confirmed.
LINKS
Task ID 2258685
Prepare Task ID 2166679 (create leads from registrations)
PR odoo/odoo#51341
Co-Authored-By: Jeremy Hennecart <jeh@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
When we buy a ticket on website, a sale order is automatically created and
confirmed if the ticket is free. When we buy a second ticket we will edit the
old SO, but we can't, because the SO was confirmed.
Solution
========
In `_create_attendees_from_registration_post`, reset the sale information.
Task ID 2188857
PR #44545
X-original-commit: d0e80ffdcc3a1ca2d872df66e1aee336f1777378
PURPOSE
Integration between event and eCommerce is required only when users handle the
entire selling process online. However users may require ticketing support
while managing payments outside of Odoo. Purpose of this commit is to support
tickets directly in event application without need of sales.
RATIONALE
Remove the need to have event_sale installed to manage basic multi ticket
event type. Integration with eCommerce is needed only when one wants to handle
the entire selling flow online, i.e. order, payment, ... Integration with
Sales is needed only when one wants to create sale orders linked to attendees.
Many event users do not need all of this. Their attendees pay through bank
transfers or they simply manage payments outside of Odoo while still
requiring tickets management.
SPECIFICATIONS
In this commit we move frontend part of ticket support from website_event_sale
to website_event. Now eCommerce / event integration adds only payment
information when registering.
About tickets
* if there is no ticket -> generic registration allowed;
* if there is one ticket -> quick registration box;
* more than one ticket -> unfolding registration box with all available
tickets;
About price
* sale not installed -> no mention of price. A ticket without price is not
free. Its description allow to tell how to pay for example;
* a price is set: price is displayed;
* no price is set: FREE is displayed;
Most event frontend templates and controllers are therefore moved from
website_event_sale to website_event. Only part about pricing and sale order
creation is now located in website_event_sale.
Buy flow remains mainly untouched. Indeed this commit is mainly about moving
template to support tickets.
LINKS
Task ID 2177281
Community PR #43488
PURPOSE
This commit is part of ticket model support directly in event application.
SPECIFICATIONS
In this commit we make a quixotic attempt to clean call chain implied by
making registrations online, either in event frontend (website_event) or
with eCommerce inclusion (website_event_sale). Purpose is to get rid of some
preparation and data management methods to handle most of the code directly
at CRUD level whenever it makes sense.
We notably
* move at create and write level support of partner_id update: updating
its name / email / phone / mobile;
* move at create and write level support of sale_order-id update: updating
event, ticket, partner;
Using that and some code cleaning some methods are removed and call chain
is a bit reduced.
LINKS
Task ID 2177281
Community PR #43488
Purpose
=======
Remove the state on the event and add a stage.
So, we can have more control on the event flow, and we will have less constrains.
Website event
=============
Before
------
People can register for an event if "seats are available" and if the state is "confirmed".
After
-----
People can register for an event if `event_registrations_open` is True,
- Event: seats are available and the event is not finished
- Event sale: One or more ticket has `sale_available` set to True
Task #2088538
A recent fix c41d1d2 was made to select the related pricelist
to show the correct price of an event product.
This fix creates another bug in case of Ecommerce app
not installed, because the method get_current_pricelist
is defined in website_sale module.
We need to move the fix from website_event to website_event_sale module.
closesodoo/odoo#31953
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Set up env & tools for module website multiwebsite (blog, event, sale..)
website_id in modelConverter and ir_rule
add _compute_domain_keys to have a different cache per website
or rules would not be correctly website_dependant
eg: blog 1 on website 1, blog 2 on website 2
access blog 1 from website 1 => can access -> normal
access blog 1 from website 2 => can access -> should crash because (ir rule)
split mixing website.published.mixin and website.published.multi.mixin to have
website_id only on last one.
multi mixing will:
- override website_published compute to take current_website into account (not in backend)
- force website when clicking on published in backend
- website blog, website_sale, website_event, website_forum, website_slides are now multi website
Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
In order for the user to easily add the date of the events to his
calendar we need to facilitate the integration with Outlook/ Google
Calendar.
For this we add two buttons at the end of the subscription phase (one
for Google Calendar and one for Outlook [ics file download])
Task ID: 39315
Closes#21854
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.
All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.
Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.
Also removed some dead code or improved the API to remove unnecessary
conversions.
Commit 14d1f6f6c1 responded to the need to have clean server answers for SEO purposes
and specifically when the products on event tickets have been archived
BUT
it introduced an infinite redirect loop when the event was in state == done
This present commit normalize the behavior in a comprehensive manner and cleans up the code a bit
OPW 757117
Closes#18667
In Python 3:
* various builtins and dict methods were changed to return
view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
removed altogether
This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).
Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.
issue #8530
Now, the user can choose on the pricelist if the price should be displayed as a
discount or not (price striked red).
cart_update and confirm_order recompute unit price by default.
So we need for website_event_sale to be able to ask to don't recompute the price.
Else the price of product will be used instead of the price of ticket.
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.
'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
- remove field complete_name
is the same as the ORM field display_name, compute the name_get
- website_publish_button is duplicated
- write outdated, according to TODO (field color already renamed)
- Instead of open_website_url, should use website_publish_button
- styles, style_in_product, attrib_encode: are no longer used in templates
- remove unnecessary rebrowse
This check was added at d3678bf5 either
- to prevent browsing as public user (wrong as always browsed with SUPERUSER_ID)
- to refresh fields of the record (I find your lack of faith in the cache
invalidation distrubing)
- remove get_pricelist method
equivalent to call request.website.get_current_pricelist
Somehow, we forgot to change some calls to action_button_confirm the to new action_confirm on the sale.order object
This applies to the following modules:
portal_sale
website_event
website_quote
website_sale
Before this request.registry.get('ir.model.data').get_object_reference()
was used to grab the event_sale.product_product_event record. After
deletion of this product get_object_reference() would still return the
old id, which upon usage would throw a MissingError exception.
So to fix this, bypass the registry caches by using just
request.env.ref().
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
automatically in all countries thanks to Berne Convention + WTO rules,
and a reference to the applicable license is clear enough.
First bug, was that the /registration/confirm had never attendee.
Because partner_ids was initialized with set() and so partner_ids &= set(xxx)
will be always empty.
Now the user have confirmation on screen that the registration is done...
Another bug/usuability problem was that when user register to a webinar
less than 1 hours before the event, if scheduler was not run menwhile,
the user has the link after that the webinar was starded...
Now, we force the mail to be send asap, and launch the scheduler at
each confirmation... Anyway, the list of email registration to send should be
never big, because every registration will launch the scheduler.
Test updated since the mail are sent direcly, it's normal to have 0 mail.
Attendees are created and deleted on changing the quantity from the cart.
Added sale_order_id and sale_order_line_id fields on registrations, allowing
to find the order and the order line that created the registration without
to rely on origin and ticket.
Also fixed check_auto_confirmation, now in multi mode to avoid issues due to
the specific behavior of api.one.
Registration are now for one attendee only. When buying several seats for an event
you have now one registration for each attendee.
event: nb_register field is removed; as well as unnecessary user_id and it subscribe /
unsubscribe behavior. Also slighly cleaned some views.
event_sale: do not auto confirm registrations linked to a draft sale order. Note: strange
origin is a char field, not a sale_order_id. Added a small wizard to edit attendees
data when confirming a sale order containing event related lines.
website_event: when buying free tickets, ask for attendee details. Added template,
controllers to handle that behavior.
website_event_sale: when buying tickets, ask for attendee details. Events ecommerce
should be better integrated with online events, using inheritance to add details
instead of being very different.
also do some trivial cleanup/simplification of website_crm while at it:
* Initialize a dict directly via literal
* Use straightforward dict copy instead of whatever that convoluted crap was
* Use gencomp for set creation
* Lift a pair of keysets to the original dict creation