Commit Graph
53 Commits
Author SHA1 Message Date
qmo-odoo 465f4f60fc [IMP] website_event: improve frontend event creation
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
2021-08-23 14:59:00 +00:00
nounoubensebia 417622d655 [IMP] [website_]event[_questions|_sale] datetimes sales start/end
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

closes odoo/odoo#65133

Related: odoo/upgrade#2126
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-25 14:58:20 +00:00
Jérémy HennecartandThibault Delavallée d01144e17d [REF] website_event(_sale): create registrations in batch when buying tickets
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>
2020-05-18 11:58:56 +00:00
Debauche Stéphane 50d1ac6263 [FIX] website_event_sale: reset sale when buying free tickets
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
2020-02-18 15:59:13 +00:00
Thibault Delavallée cb928ed613 [REF][MOV] website_event(_sale): support tickets in website_event frontend
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
2020-01-30 15:18:08 +00:00
Thibault Delavallée ec121565cc [IMP] event: clean code about synchronizing partner / sale order line
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
2020-01-30 15:18:08 +00:00
Debauche Stéphane 412ff994f1 [IMP] event: replace state by kanban stage
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
2020-01-08 09:11:50 +00:00
f402afd7b5 [REF] website_event, *: review event design and features
* event, website_event_questions, website_event_sale,
  website_event_track, base

Part of https://github.com/odoo/odoo/pull/37009
task-2043872

Co-authored-by: qsm-odoo <qsm@odoo.com>
Co-authored-by: Jérémy Kersten <jke@odoo.com>
2019-09-27 13:36:37 +00:00
Alex Tuyls f7acbf6466 [FIX] website_event,website_event_sale: correction pricelist in event register
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.

closes odoo/odoo#31953

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-03-19 15:57:46 +00:00
Jeremy KerstenandDerie Romain 066cfc9598 [IMP] website_[blog|event|forum|sale|slide]: make website specific
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>
2018-08-13 20:16:34 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Christophe Simonis df3b75a127 [MERGE] forward port branch saas-15 up to f1ae96e389 2018-05-15 18:58:20 +02:00
Christophe Simonis 13fc77daf4 [MERGE] forward port branch 9.0 up to 19878d011f 2018-05-15 16:51:34 +02:00
RomainLibert 19878d011f [FIX] event: fix bug with users
We need to fix a problem with the users where someone might get
informations on registrations.
2018-05-15 09:41:25 +02:00
Sanjay Jamod 7862b2b71c [IMP] website_event: quick add to Outlook/Google Calendar
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
2018-04-30 10:58:20 +02:00
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
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.
2017-08-20 23:25:54 +02:00
Christophe Simonis 48b2ce60ed [MERGE] forward port branch saas-16 up to 85571bb78c 2017-08-10 17:01:05 +02:00
Christophe Simonis 85571bb78c [MERGE] forward port branch saas-15 up to dde62073ba 2017-08-10 16:22:36 +02:00
Lucas Perais (lpe) 78014ff3ac [FIX] website_event, _sale: protect against inactive products
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
2017-08-07 09:51:15 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
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
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Jairo Llopis e7fdd6df73 [IMP] website_event(_sale): make registration form responsive
+ remove redirect that create loop if not child menu and state == 'done'

TODO: make attendees registration popup responsive

This commit closes #15473
2017-03-24 17:03:20 +01:00
Jeremy Kersten 14d1f6f6c1 [FIX] website_event[_sale]: don't allow register when event is done
Some previous links could still point to old register page and so display an
error 500 if product of ticket has been already archived.
2017-02-24 19:18:31 +01:00
Jeremy Kersten a26a84f9c0 [IMP] website_sale, website_sale_event: adapt views to respetc the show_discount
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.
2016-09-06 13:59:35 +02:00
Raphael Collet 75dc39e042 [REF] openerp.http: make request.context consistent with request.env.context 2016-08-31 17:21:58 +02:00
Christophe Matthieu 688db44c42 [IMP] website_sale: improve performance, use less db request to have pricelist data
Use pricelist in the context instead of pricelist id.
2016-08-29 15:32:44 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
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.
2016-08-04 12:02:14 +02:00
dut-odoo c83702a36a [IMP] event: change term 'Subscription' to 'Registration'
Changed term 'subscription' to 'registration' in event, event_sale,
website_event, website_event_sale modules
2016-05-13 11:28:28 +02:00
Deep Bundela 6e28d2071d [MIG] website_event_sale : migrate to new api 2016-04-14 11:56:45 +02:00
Jérome Maes ca8a47c352 [IMP] website_event, website_event_track, website_event_sale : prepare migration
- change method decorator (api.one -> api.multi) for `_set_show_menu`
and `_set_show_menu`
- rename controller class
2016-04-14 11:56:44 +02:00
Martin Trigaux 2c904509a3 [IMP] website_sale: cleaning of outdated code
- 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
2016-03-17 17:26:38 +01:00
Damien Bouvy 063ad00442 [FIX] sale: function changed name in refactoring is now applied everywhere
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
2015-09-04 16:08:22 +02:00
Joren Van Onder cdd7ab7f56 [FIX] website_event_sale: don't use registry cache for default ticket
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().
2015-07-29 20:27:25 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- 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.
2015-06-02 03:16:04 +02:00
Jeremy Kersten b220f68b4f [FIX] website_event_sale, event: fix registration to event
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.
2015-05-13 17:43:09 +02:00
Denis Ledoux 2ec254549c [FIX] website_event_sale: there is not self.pool in controllers
There is no such thing. request.registry must be used instead
of self.pool.

opw-632408
2015-04-08 16:40:32 +02:00
Thibault Delavallée f4f9ab5062 [FIX][IMP] website_event_sale: if the user buys only free tickets
redirect directly to the website_event confirmation view and confirm
the sale order instead of going to the checkout process.
2015-04-02 11:56:58 +02:00
Mahendrasinh Barad e2e38076aa [IMP] website_event_sale: validation of seats availability in cart.
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.
2014-12-24 14:23:21 +01:00
Christophe Simonis 27979746fb [MERGE] forward port of branch 8.0 up to 92183e5 2014-10-24 18:23:46 +02:00
Christophe Matthieu 23f9736372 [FIX] website_event_sale: display the discounted price in website.
Add price_reduce compute method on ticket and sale order line
2014-10-24 14:16:16 +02:00
Paramjit Singh Sahota ca862e7b85 [IMP] event: Split Ticket: registration are now for one attendee only.
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.
2014-10-09 10:09:06 +02:00
Christophe Matthieu 5064c5b1a5 [FIX] website_event_sale: need to use new api to send the context. Add some step for test to check if the cart have the distinct products 2014-09-10 10:09:55 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Fabien Meghazi 8eed143112 [IMP] Invert multilang logic in route decorator. True by default, can be set to False explicitlty 2014-05-13 11:35:45 +02:00
Xavier Morel cc9d056711 [FIX] website_crm, website_event_sale: remove stray prints
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
2014-05-13 09:56:28 +02:00
chm@openerp.com c10800f2f1 [FIX] website_event_sale: multi tickets
bzr revid: chm@openerp.com-20140502140152-hx7ktaf0cg2m7ija
2014-05-02 16:01:52 +02:00
chm@openerp.com 7298130f31 [MERGE] from trunk
bzr revid: chm@openerp.com-20140410152925-ndajhnyh4rt8pkgu
2014-04-10 17:29:25 +02:00
chm@openerp.com 353bbdc2c3 [FIX] website: route and redirect: remove all backslash from url
bzr revid: chm@openerp.com-20140314162346-25vohj6ayp65tgiy
2014-03-14 17:23:46 +01:00
Christophe Matthieu 07b5cb38a0 [IMP] website_sale: refactoring: website_event_sale: fix for refactoring
bzr revid: chm@openerp.com-20140225125736-dni507i8xpz1b61j
2014-02-25 13:57:36 +01:00
Fabien Pinckaers cf2349d63c [FIX] Create an event
bzr revid: fp@tinyerp.com-20140130181638-ww2dor24eshzc81c
2014-01-30 19:16:38 +01:00