Files
odoo_source/addons/event/data/event_data.xml
T
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

69 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Event Mail Scheduler-->
<record model="ir.cron" forcecreate="True" id="event_mail_scheduler">
<field name="name">Event: Mail Scheduler</field>
<field name="model_id" ref="model_event_mail"/>
<field name="state">code</field>
<field name="code">model.run(True)</field>
<field name="user_id" ref="base.user_root"/>
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
</record>
<!-- Event Categories -->
<record id="event_type_data_online" model="event.type">
<field name="name">Online</field>
<field name="is_online" eval="True"/>
<field name="auto_confirm" eval="True"/>
<field name="use_mail_schedule" eval="False"/>
</record>
<record id="event_type_data_physical" model="event.type">
<field name="name">Physical Event</field>
<field name="is_online" eval="False"/>
<field name="auto_confirm" eval="True"/>
<field name="use_mail_schedule" eval="False"/>
</record>
<record id="event_type_data_ticket" model="event.type">
<field name="name">Ticketing</field>
<field name="auto_confirm" eval="False"/>
<field name="use_mail_schedule" eval="True"/>
<field name="use_ticket" eval="True"/>
</record>
<!-- Event stages -->
<record id="event_stage_new" model="event.stage">
<field name="name">New</field>
<field name="description">Freshly created</field>
<field name="sequence">1</field>
</record>
<record id="event_stage_booked" model="event.stage">
<field name="name">Booked</field>
<field name="description">The place has been reserved</field>
<field name="sequence">2</field>
</record>
<record id="event_stage_announced" model="event.stage">
<field name="name">Announced</field>
<field name="description">The event has been publicly announced</field>
<field name="sequence">3</field>
</record>
<record id="event_stage_done" model="event.stage">
<field name="name">Ended</field>
<field name="description">Fully ended</field>
<field name="sequence">5</field>
<field name="pipe_end" eval="True"/>
<field name="fold" eval="True"/>
</record>
<record id="event_stage_cancelled" model="event.stage">
<field name="name">Cancelled</field>
<field name="description">The event has been cancelled</field>
<field name="sequence">6</field>
<field name="pipe_end" eval="True"/>
<field name="fold" eval="True"/>
</record>
</data>
</odoo>