Commit Graph
1395 Commits
Author SHA1 Message Date
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
Martin Trigaux d9287caf94 [IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id

Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
2020-05-14 13:59:10 +02:00
Jeremy Kersten 4b9e14719e [FIX] website_event: website.404 became http_routing.404 in 423402f
Before this commit, the /event/event-id/page/inexisting_page crashes with an
internal error 500:
of1 ValueError: View 'website.404' in website 1 not found

X-original-commit: d493fdd2e837b5e6931bd8c2c4d57712432f9107
2020-05-08 15:55:08 +00:00
DramixDw 9b9829416b [IMP] website: simplify website menu
Some apps, once installed, automatically create a menuitem in website.
What complexify the UI and create useless menu withtout plusvalue.

It is not because you install livechat to make support online, that you want
a link in your menu to show stats e.g.

Now we remove the default menu created, and help user to find it when he create
a link. The autocomplete suggest most of the main App's controllers

task-2189613

closes odoo/odoo#49081

Related: odoo/enterprise#9733
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-01 07:59:07 +00:00
fja-odoo 11c60739e4 [IMP] website, *: warn user about outdated blocks
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-27 16:36:31 +00:00
Martin Trigaux 2d00263127 [I18N] *: export saas-13.3 translations
closes odoo/odoo#50031

X-original-commit: 15a7a9f9d71a0b9c46d7caf2f4fbf09a5a4c63fe
Related: odoo/enterprise#10140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-04-23 07:13:48 +00:00
Thibault Delavallée bc1b5e134b [FIX] website_event: better sold out computation
Purpose of this commit is to remove some complex check embedded in templates
and replace them by a computed unstored field. It eases definition and
understanding.

Its computation has been cleaned, so that sold out appears only when tickets
are really sold out, not if their end sales date is reached. Sold out label
is displayed in both event list and event specific page views in frontend.

Small spacing issues in frontend registration form are also fixed.

Task ID 2228189
Community PR odoo/odoo#48652

X-original-commit: c36cf90e7b83d2424b2f52ad8a2fec0bf367e8d8
2020-04-03 11:07:56 +00:00
Thibault Delavallée b29b4bcbfc [FIX] event: ensure event_registrations_open can always be computed
Using a compute_sudo ensure this field is correctly computed (aka without
crash) if someone is allowed to read the event but not all its sub models.
For example event_registrations_open reads the active flag of a product
linked to a ticker which may not be readable by public users. This field
is used in frontend templates and therefore usable by external people.

Also remove unnecessary registrable rendering parameter in website_event
as it has been replaced by computed fields.

Task ID 2228189
Community PR odoo/odoo#48652

X-original-commit: b2b334a65f3a1379f25717ec39f0a52f3305b19c
2020-04-03 11:07:56 +00:00
Thibault Delavallée d2840a0519 [FIX] event: include timezoned event date_end in registration open computation
Purpose of this commit is to try to lessen random conditions being concatenated
in templates by correctly computing event_registrations_open field that is
now correctly based on

  * event.date_end -> if event is done, registrations are not open anymore;
  * event.start_sale_date -> lowest start date of tickets (if any; start_sale_date
    is False if no ticket are defined, see _compute_start_sale_date);
  * any ticket is available for sale (seats available) if any;
  * seats are unlimited or seats are available;

Some better timezone computation is included even if it could be done better.

Task ID 2228189
Community PR odoo/odoo#48652

X-original-commit: a11af9074499465b6dd8ad1400e60c7af96e21c7
2020-04-03 11:07:55 +00:00
Tiffany Chang (tic) 1ac243c21c [IMP] various: Replace incorrect use of "edition"
"Edition" is a French-English false friend word. "Edition" in English
means "version" whereas "edition" in French means "editing". This commit
updates user facing strings/documents that incorrectly use "edition" instead
of "edit" or "editing". Attempts were made to clean up English around
"edition" usage so please excuse any errors from lack of context
knowledge. Code comments and names incorrectly using "edition" were NOT
updated.
2020-03-31 10:31:35 +00:00
Patrick Hoste bd99cc24b1 [IMP] website_event(_track): improve website and track menus behavior
PURPOSE

Before this commit to activate the sub-menu, the tracks and the track proposal
you had to do it on the event form view. After this commit you'll have to go
on the event website page to change those options (through the customize dropdown)

SPECIFICATION

Remove the 'website_menu' / 'website_track' / 'website_track_proposal' from the
event form view and create a toggle option in the customize dropdown on the event
website page instead.

LINKS

Task ID : 2198660
PR : #46659
2020-03-31 06:34:45 +00:00
Patrick Hoste d2e02976e2 [REF] (website_)event(_sale): change seats_availability field to seats_limited
PURPOSE

Change seats_availability selection field into a boolean field
and rename it to seats_limited for consistency.

SPECIFICATION

Change all the tests accordingly.

Task ID : 2198660
PR : #46659
2020-03-31 06:34:45 +00:00
Patrick Hoste aebe199d80 [IMP] (website_)event(_track): change event form view display
PURPOSE

Change the event form view to improve its usability and make it clearer.

SPECIFICATIONS

- Change some stats buttons icons
- Change order of the fields and put the range date field in second
place since it's a mandatory field.

LINKS

Task ID : 2198660
PR : #46659
2020-03-31 06:31:08 +00:00
Goffin Simon e4be7ad7a6 [FIX] website_event: Ordering more tickets than available seats
Steps to reproduce the bug:

- Let's consider an event E with Maximum Attendees = 2 and Autoconfirm
- Create two kind of tickets Premium with Maximum available seats = 2 and Normal with Maximum available seats = 2
- Go to the website and register for E
- Take two tickets Premium and two tickets Normal

Bug:

Odoo gave the possibility to buy for tickets for E even if the Maximum Attendees was 2
and Odoo never autoconfirm these tickets.

opw:2214576

closes odoo/odoo#48567

X-original-commit: ff49afc6c71285cf90f720f2e97f8adedee7204b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-30 14:34:55 +00:00
Romain Derie a3fa70fd5f [FIX] website_event: restore edit menu choice
Website has a behavior that will ask you which menu you want to edit if you
click on 'Edit Menu' in the topbar and there is more than one menu in the DOM.

This is typically the case for the event pages where the event has its own menu
on top of the website one.

This event menu was not triggering that behavior since 5b563549fa where is
was accidentally broken.

closes odoo/odoo#48459

X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-03-26 16:44:32 +00:00
Patrick Hoste 37d281681c [FIX] website_event(_track): fix duplicate submenu
PURPOSE

Before this commit when updating an event with website_menu, website_track or
website_track_proposal activated it created an extra sub menu even if already
created. This commit fix this issue.

SPECIFICATIONS

Check if the menu doesn't exist before creating it.

LINKS

Task ID : 2210441
PR : #47058

closes odoo/odoo#48451

X-original-commit: d6e334d48aace3fce196bb0652915cd5232ffbe7
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-26 15:57:21 +00:00
qmo-odoo cd1a60a141 [FIX] website_event: Fix white font on white bg issue in bootswatch
On event cards of the /event page, the "bubble" with the date would appear
blank in bootswatch theme.

This commit forces the text to be black and therefore visible.

LINKS:

TaskID:2162438
PR: #43856
2020-03-26 14:59:20 +00:00
qmo-odoo 8facd0e357 [IMP] website_event: show that an event is online
Before this commit, no location was shown on the event page
if the event was online.

This commit changes that so that it clearly displays that the
event is online.

LINKS:

TaskID:2162438
PR: #43856
2020-03-26 14:59:19 +00:00
qmo-odoo eb690ff481 [IMP] website_event: Improve '/event' UX
Purpose:

Fix a few minor issues with the design and make some light
UX improvments.

Specs:

- In customize menu, show templates should be set as False as templates
  are more of a technical thing anyway.

- In location filter, fix the alignment for the "online" option.

- Fix card design in case "show templates" is True and the event is online

- Make the whole event card clickable

LINKS:

TaskID:2162438
PR: #43856
2020-03-26 14:59:18 +00:00
qmo-odoo 70d573343e [IMP] website_event: Improve event registration
Purpose:

Improve the registration on front-end by allowing the manager
to customize it and display more informations to users about the tickets
and the status of the event.

Specs:

For event manager:

 Allow users to decide wether or not they want to unfold/fold
 ticket details on their event. The reason behind this is that
 some events might have 5+ different tickets and having them unfolded
 would bloat the UI quite horribly.

 By default, ticket details should be unfolded with no possibility for the end users
 to fold it back.

 Always display a button for the manager to go configure the event in back-end

For users in general:

 Show price range in case the ticket details are folded.

 Clearly show the user that a particular ticket is sold out/expired

 Cleary show the user that registrations are open/closed/sold out

LINKS:

TaskID:2162438
PR: #43856
2020-03-26 14:59:17 +00:00
qmo-odoo 91eded2eb2 [IMP] website_event, event: Add event.tag.category and event.tag + rename event.type display name
This commit changes the display name for the model event.type from
"Event Category" to "Event Template"

This change was needed before introducing the new model event.tag.category
which will be used to group tags (event.tag)

This commit introduces two new models: event.tag.category & event.tag

The tags will be grouped by category and will be used to filter events.

In the front-end, if the user activates the "filter by categories", each
event.tag.category will generate a new dropdown of related tags.
Clicking on one of these tags will add a new "tag badge" above the events
(same way as in eLearning).

LINKS:

TaskID:2162438
PR: #43856
2020-03-26 14:59:16 +00:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00
Romain Derie e7ef57f687 [FIX] website_blog, website_event: prevent wrong meta og:image URL
Without this commit, if the cover properties's background-image contains single
quotes in the `url()`, that will lead to 404 image in SEO dialog.
It will also lead to wrong og:image in the DOM.

Before:
`<meta property="og:image" content="'website_blog/static/src/img/cover_1.jpg'"/>`
Now:
`<meta property="og:image" content="http://localhost:8069/website_blog/static/src/img/cover_1.jpg"/>`

This is the case for all our demo data.

closes odoo/odoo#47994

X-original-commit: 2338f8ecc8c21299774e288ab07bb084a58cc7ab
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-03-19 10:15:37 +00:00
qmo-odoo 7cdf8c25a6 [IMP] (website_)event: improve demo data
In order to have an easier and better time showcasing the functionalities of
event, demo data had to be improved.

LINKS

closes odoo/odoo#45372

Taskid: 2170834
Pr: #45372
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-17 07:56:17 +00:00
Patrick Hoste 8509ba7d2a [IMP] (website_)event: add new tour to demonstrate new features
PURPOSE

Create a tour for Events to introduce new users to this freshly
revamped application.

SPECIFICATIONS

In 'website_event' module the tour steps extends the 'event' tour steps

LINKS

Task ID : 2180175
PR : #45612

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-12 12:45:16 +00:00
Romeo Fragomeli ab2e3fdb7d [REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.

To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.

Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
2020-03-11 10:10:16 +00:00
Thibault Delavallée e7c4e94275 [FIX] website_event: copy website_menu when copying an event
Currently website_menu boolean field is not copied when copying an event. It
comes from an issue related to duplicating website menus. It seems real issue
has been fixed at 1a8993e0cb . Current copy=False on website_menu is a wrong fix
due to some mismatch in forward-port. We can therefore copy website_menu
again.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911
2020-03-10 11:15:09 +00:00
Thibault Delavallée 968ef0223f [REF] website_event(_track/_question) : move from onchange / default to stored editable computed fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS: GLOBAL RULES

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: WEBSITE_TRACK(_PROPOSAL)

Keep an explicit onchange for tick / untick of website_track_proposal. Indeed
otherwise you have a loop of dependencies between website_track and
website_track_proposal

  * untick website_track: website_track_proposal = False (done in _compute_website_track_proposal)
  * tick website_track: no effect
  * untick website_track_proposal: no effect
  * tick website_track_proposa: website_track = True

It would be complicated to write in computed fields, as they depend on each
other, on cache and current values, ... It is therefore simpler to keep an
onchange: when ticking website_track_proposal set website_track as True in
interface.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911
2020-03-10 11:15:09 +00:00
Thibault DelavalléeandMichaël Mattiello 5e4efef3ca [REF] event : move from onchange / default to stored editable computed fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS: GLOBAL RULES

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: REQUIRED FIELDS

As computed fields are computed after create required attribute cannot be
respected without computing them beforehand. That is why we have some custom
code to compute required fields if not given at create and update the creation
values accordingly.

SPECIFICATIONS: MAIL SCHEDULING

Mail scheduling on event type is modified in this commit. Previously checking
the use_mail_schedule radio button had no effect on event_type_mail_ids field.
It is now reset if unchecked. It is therefore coherent with use_ticket and
event_type_ticket_ids field behavior.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Michaël Mattiello <mcm@odoo.com>
2020-03-10 11:15:09 +00:00
Thibault Delavallée 2235176347 [MOV] website_event(_track): rename some odd methods and files, remove dead code
In order to keep things organized, let us move some models in their own file
and rename some test files. Some odd methods are relocated to better follow
guidelines. Dead code is removed because we do not like dead code.

LINKS

Task ID 2089156
Community PR odoo/odoo#42911
2020-03-10 11:15:08 +00:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Thibault Delavallée 3c70eb3d04 [FIX] website_event: correctly support registrations without ticket
Current code handles "no ticket registration" having ticket_id set to 0
as a valid event.event.ticket ID. We fix that issue by correctly setting
the many2one to False.

Followup of cb928ed613

X-original-commit: 7c1acba32d814ec287c60d0a95f3911d51678932
2020-02-27 13:16:11 +00:00
Debauche Stéphane 3721f49d4e [FIX] website_event(_questions): correctly parse frontend question answers
When user register to an event from website, they can answer questions
specific to a given registration or to all registrations. However they
are not correctly parsed and not saved.

Task 2188857
PR #44545

X-original-commit: e27d9b5c4f234f6ce64456c2f52e7cfb0331332f
2020-02-18 15:59:12 +00:00
Patrick Hoste 71206f42f7 [IMP] event: improve event tree view
PURPOSE

Update tree view to add optional fields to make it easier to read.

SPECIFICATION

Modify the event_views files to add some fields (optional or not)
It add some more informations about the seats, the tracks and sponsors
and if the event is online or not.

LINKS

Task ID : 2192652
PR : #44938

Related: odoo/upgrade#801
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-18 14:14:46 +00:00
qmo-odooandDavid Beguin b8e33b2439 [IMP] website_event: improve front-end display
This commit makes a few design improvements in the Event list in front-end
after some feedback about its usability

- Make the 'configure your registration' alter not editable (for studio)
- Display the "is online" through a "tag" design, not just text
- Remove remaining seats count
- Some display cleaning and improvements (design)
- Put the event date just below event title on event frontend list
- apply some minor design improvements in the /register page.
- Filter by month instead of weeks :
    This commit changes the date filtering in website_event.
    Before this commit, users could filter events by weeks.
    After this commit, users will be able to filter by months
    and will be able to filter events up to two months in the future.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
qmo-odooandDavid Beguin 9444d25db9 [IMP] website_event: deactivate some custom views by default
Before this commit, in the "customize" menu on /event, custom views enabling
filters by "category, country" and the "show sidebar" were activated by
default. This commit deactivates them by default.

Reason behind this change is that most people don't have enough events to
justify having those filters on by default.

LINKS

TaskID 2162438
Community PR odoo/odoo#44476

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Quentin Mourier <qmo@odoo.com>
2020-02-18 09:24:26 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
qmo-odoo b0ec3aa1eb [REF] event: remove twitter_hashtag and its configuration on event type
This commit removes the field twitter_hashtag from event and event_type.
The justification behind this change is that it has been made obsolete
by our social marketing app and our website builder.

Task ID 2191921
Community PR odoo/odoo#44715
Upgrade PR odoo/upgrade#764

Related: odoo/upgrade#764
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-11 14:36:52 +00:00
Bhavita Bhattandjpr-odoo 4e162a4e75 [IMP] website, website_link: improve frontend config screens
Following things are done in this commit:
1. changed some labeling and string for more readable and helpful to the user
2. added extra width to the text box
3. added publish/unpublish option for mobile view.
4. track page option auto-activated for any new page,event,job offer,course,
   blog.

task-2088546
closes #40085

Co-authored-by: jpr-odoo <jpr@openerp.com>
2020-02-11 15:30:00 +00:00
Patrick Hoste 14ce43f2ee [IMP] event: change name field from event registration + minor changes
PURPOSE

Make 'name' field from event registration mandatory.
Change placeholder for event name to give an example.

LINKS

Task ID : 2093336
PR : #43420
2020-02-04 15:07:43 +00:00
Xavier Morel de590816d8 [FIX] *: deprecated access to url_ utilities through werkzeug root
In 0.15 accessing werkzeug.urls functions directly through werkzeug
is deprecated, the shortcut will be removed in the eventual werkzeug
1.0.

Fix existing uses of these shortcuts. Also cleanup some imports when
they're not far from a werkzeug* import being altered.
2020-02-04 12:42:35 +00:00
Romain Derie 4eb2aeb8e7 [IMP] website: make cover_properties a mixin field
Next commit will add new cover properties entries for the bg color.
Still, we want a default `bg-primary` class. Instead of addind 3 new default
value in existing cover_property fields, the chance is taken to make a mixin
out of that field to avoid code duplication.

task-2144335
2020-02-04 13:06:08 +00:00
Romain Derie 8fc61fd2b4 [REM] website(_blog/_event): remove filtercolor option on cover
task-2144335
2020-02-04 10:59:22 +00:00
Romain Derie d64eb2981f [REM] website, website_blog, website_event: remove text size on cover
task-2144335
2020-02-03 15:25:20 +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 6b09c1b8c6 [REF] event: move ticket definition from event_sale to event and use ticket templates
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

Remove the need to have event_sale installed to manage basic ticketing on
events.

Move ticket model (event.event.ticket) directly into event, copying most
fields from event_sale. Only sale specific fields and behavior should be kept
in event_sale :

  * keep product_id and price information in event_sale;
  * keep sales analysis in event_sale;

We also split tickets model used for event type (event.type.ticket) and
events (event.event.ticket). Indeed previously to this commit both are
modeled in the same table, with the following issues :

  * tickets on templates use only a subset of fields: name, seats availability,
    product, price;
  * a ticket has either an event_id, either an event_type_id, and there are
    constraints to try to avoid having lost tickets. This leads to a strange
    model where m2o fields are required only in some cases with a dual
    behavior;
  * tickets are not shared between event.type and event.event. They are copied
    and having a single model is therefore not necessary;

We therefore choose to have a light model for event.type.ticket. It is linked
to event.type when configuring template tickets. They are copied in the
onchange copying event template configuration to the event itself, leading
to event.event.ticket creation.

Some tests are moved / completed accordingly.

Access rights are copied from website_event_sale to website_even concerning
ticket access for public / portal. Currently they are kept as they are with
some rewording as it is not the purpose of this commit to rewrite them.

LINKS

Task ID 2177281
Community PR odoo/odoo#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
Cocographique 8b9f17ee90 [FIX] website_event: fix pager position and alignment
closes odoo/odoo#44128

X-original-commit: d9e7e16c2ef5ac5fb4262a51dc5811f7f402d2cb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-28 15:01:17 +00:00
Thibault Delavallée 553e0cd51e [MOV][IMP] (website_)event_sale: prepare views for ticket model update
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 prepare
support of tickets directly in event application without need of sales.

SPECIFICATIONS

In this commit we prepare the ticket model split and update by

  * define views for ticket model. Currently views are directly embedded
    in o2m of event.type and event.event, leading to complex xpath to
    modify them. They are now real views;
  * split templates in website_event_sale, to have templates related to
    website_event and website_sale separated, leading to more simple diff
    comprehension;

LINKS

Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
2020-01-28 10:54:46 +00:00
Thibault Delavallée 8bc9d77104 [IMP] (website_)event: clean fields definition and parameters
In this commit we prepare future event model changes by reordering removing
unnecessary parameters definitions, notably readonly set to False as it is
the default value. Those parameters notably come from 412ff994f1 .

Some reordering is also done in order to better understand future pre / post
change model organization.

LINKS

Task ID 2177281 (support tickets directly in event)
Prepares Community PR odoo/odoo#43488
Closes Community PR odoo/odoo#44066
2020-01-28 10:54:46 +00:00