In the event app, we have few email templates ('event.type') defined
in the data file so that when app is installed, user can have some basic
information readily available.
When needed, this data records are updated in few dependent modules
to provide more meaning to them. However, if these data records are
deleted, and someone tries to install it's dependent modules, it will
throw traceback because `<record>` tag won't be able to find the
linked record.
This commit makes the installation process more robust for such
modules by using write method with help of `<function>` tag, so
that if the record is available, it will be updated otherwise
no traceback will be thrown.
TaskID-2584092
closesodoo/odoo#80826
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Jinja as a templating engine was problematic in differents respect:
- introduce external dependency to Odoo (less controll)
- add another templating mechanism in the stack
- specific feature in qweb cannot be reused
- difficulty in rendering easily editable templates
- more knowledge required with no betterment
By replacing jinja with qweb we can now build tools to edit a qweb
that will work with the previously jinja encoded document
(essentially `mail.template` records).
There is a catch however. Some email fields (eg. email_to) used jinja
syntax for rendering dynamic variables (ie. ${object.something} and
${object.something_that_should_not_be_escaped | safe}).
We still want user to use dynamic variables for some char fields (eg.
subject, from, to, ...). We made a new rendering engine called
"inline_template" that will render an expression enclosed by `{{` and
`}}`.
To be able to edit the templates from the backend interface, a
plugin to the Odoo editor has been made for seamlessly edit the
document.
This qweb plugin includes:
- make dynamic variables (eg. `<t t-out="variable"/>`) not editable
(for preventing the user to shoot himself in the foot)
- group and hide related logical branching (ie. t-if, t-elif, and t-else)
in order to see only one at once
- a floating select input to switch visibility of a particular logical
branching
Task-27033
X-original-commit: odoo/odoo@68182baff4
Part-of: odoo/odoo#77377
In the track stage model, the fields 'is_accepted' and 'is_done' of the
track stage model are not self-explanatory enough. The user may not know
that those fields will have an impact on the visibility and the accessibility
of the tracks in the frontend. We will then rename those fields and update
their use to make it clearer.
Rules are now
* a published track is always displayed in agenda, tracks list and page
view, whatever its state;
* a track in a 'is_visible_in_agenda' stage (replacing 'is_accepted') is
always displayed in agenda and tracks list. Its page view access is based
on ACLs: aka: published = everyone, unpublished = for event users only;
* a track in a 'is_fully_accessible' stage (replacing 'is_done') is
automatically published when entering this stage, allowing its full
display
This means that
* tracks may be displayed in agenda and tracks list to public without giving
access to their page;
* easy way to publish tracks at once is achieved by moving them in batch in
a fully accessible stage;
* early-disclosure of tracks is achieved by publishing them manually whatever
the stage;
* easy removal of track page view is achieved by unpublishing them manually
whatever the stage;
Page view still relies on ACLs, and therefore on published flag automatically
set when entering "fully accessible" stage.
task-2504216
COM PR: odoo/odoo#69585
UPG PR: odoo/upgrade#2408
Purpose is to have all mail template into a mail_template_data.xml file
when possible. It eases maintenance and update when having to work globally
on template records.
Also update some ``body_html`` declarations still using ``xml`` instead of
``html``.
Task ID-2534550 (Template usage improvement)
Task ID-2477164 (Composer mixin)
Prepares Task ID-27033 (QWeb in templates)
COM PR odoo/odoo#70889
ENT PR odoo/enterprise#18352
This commit slightly reworks the "event_track_template_new" template to format
it a little better and get rid of unnecessary blank sections.
The "subject" param was removed from the "message_post_with_view" call as we
don't want the chatter to contain the name of the track twice.
Indeed, since #61570, the "subject" is displayed in the chatter if it differs
from the thread name (which is the case here).
This causes a small regression for emails that will state "Re: EventName" in
their subject instead of the track name, but it's deemed acceptable to have a
nicer chatter message.
We also remove the description of the "mt_event_track" mail.message.subtype as
it's only used with a custom template and is redundant with that template's
content.
Task-2496444
closesodoo/odoo#68864
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Distinguish and display to the speaker which info is collected by the form
for internal use vs external dissemination. The contact details one wants to
share with the event manager (Private details : contact_phone, contact_email)
could indeed be different from the ones shared to attendees (partner_phone,
partner_email,...). The form in both back-end and front-end is made more
detailed, including more fields. Previously the form could have several
speakers, now only one.
Front-End
- Track proposal form changed, now includes tags, contact / speaker info...
- Track name and description are mandatory fields
- User can select (but not create) several track tags from those existing.
This allows categorizing the track in pre-defined categories with format
"tag category : tag name". It requires a select2 widget,
implemented in new file website_event_track_proposal_add_tag.js.
- New tickable section "contact me through different contact" not displayed
if the checkbox is not ticked. If the section is ticked, then the info set
there (contact_name, contact_phone, contact_email) will be added on a new
contact with id partner_id set on the track.
- In both cases (checkbox on/off), if the contact/partner email is the
same as logged user's, uses its partner on form. No contact creation needed.
- Improved / dynamic error display on form submission. If the form is valid,
it resets after submission.
- New widget in website_event_track_proposal.js:
- The partner_name is propagated on contact_name on input but editable.
- When the optional section is checked:
- The contact_name is made required.
- The user must at least enter a contact phone or an email. The email
is normalized but any phone format is accepted, since the choice of
country is not resolved (e.g. geoip not always relevant). Could be
improved with international phone number widget, see COM PR #34725
Back-end: following changes are done to ease contact creation and form completion
from back-end, as well as reaching the speaker from chatter
- On the form:
- If created on the fly from M2O (entering a name and using "create ..."),
the new partner will use default values contact_phone and contact_email.
- Once the contact is set (partner_id), contact_phone and contact_email
are set to readonly since they change according to the partner.
- When setting or changing the partner: this will fill all the form fields
with new available partner data to ease the flow, but only the empty ones
(this prevents losing previously entered information).
If partner is a company, company name is set to the name of partner.
- All fields are editable in the speaker section.
- Exception thrown if no contact mean available when supposed to.
- On the chatter, about contact creation and message subscription:
- From contact creation through suggested contacts.
- If the partner is set but is not in the followers, it is suggested
- If no partner is set, then there is at maximum one suggested contact
from track data: using contact_email if there is one, partner_email
otherwise. This priority serves main commit purpose. The user can
create and edit a corresponding contact if the address is not linked
to a partner. It will then be searched for and set on track.
Modifies tests in test_track_partner_sync. Before, partner fields on track
would be erased by customer's ones. Now, they are updated only if empty.
Contact fields are erased by customer's ones if set. tests changed accordingly.
Task ID - 2329406
COM PR odoo/odoo#60847
UPG PR odoo/upgrade#2346
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE
Events often have sponsors displayed on their front page. This should be
a real standalone feature of Online Event application. However currently it
cannot be used without tracks managements
PURPOSE
Purpose of this task is to allow to use and display sponsors on an Event front
page without using tracks. Moreover online and chat capabilities should be
part of a sponsor feature, located within website_event_exhibitor module.
SPECIFICATIONS
Move everything related to event.sponsor model from website_event_track
to website_event_exhibitor. Functionally feature should be the same as
before except that we should be able to configure and display sponsors
directly with website_event_exhibitor application without using tracks.
Website_event_exhibitor should also define the sponsor template used to
display sponsors below an event.
LINKS
Task ID-2326433
COM PR odoo/odoo#61781
ENT pr odoo/enterprise#14752
UPG PR odoo/upgrade#1931
PURPOSE
Clean organization of templates in odoo apps: mail.template records in data,
qweb templates (views) used directly in code, notably using post with view.
Purpose is to ease future improvements in posting based on templates.
SPECIFICATIONS
* move those templates in their own file to ease their discovering and
maintenance;
* put them into data (as those are not views even if it contains qweb)
* guidelines are now :
-> Qweb templates should be in data/mail_templates.xml;
-> mail.template records should be in data/mail_template_data.xml;
* put their declaration in no update when not done if template has no
technical code or complex dependency on underlying code;
* move found mail data (mail.message.subtype or mail.activity.type) records
in a mail_data file that should contain only "core" records linked to mail;
LINKS
Task ID-2375767
COM PR odoo/odoo#61814
ENT PR odoo/enterprise#14775
UPG PR odoo/upgrade#1936
According to late specifications we are about to loose at least 20K€ in our
marketing actions if we do not
* add a header 'Book your talks' on track page, as maybe it is unclear
that a talks list having favorite buttons is there to help you booking
your talks;
* put 'Add to favorite' button as standard instead of small;
* reorganize track card in list display, notably
* hide tags in mobile as this adds a lot of noise, especially when having
lot of tracks;
* use background color as in agenda to highlight important tracks;
* move favorite button on top of card in mobile;
* hide duration in mobile, keeping only exact datetime at which is begins;
* globally align items in desktop / mobile to have a nice display;
Task ID-2325327
PR odoo/odoo#56430
X-original-commit: 366b70f3d4758bbab0a3c16dc0ec48f300f1de8c
Purpose is to improve a bit tracks in Online Reveal demo event. Notably improve
synchronization of demo in website_event_track_live with their content in base
track module. Tweak some hours to make agenda look nicer.
Task ID-2312007 (demo fix)
Task ID-2314778 (event online fixes)
PR #56340
X-Original-PR #56254
X-Original-Commit odoo/odoo@8b46e9ee3b
PURPOSE
Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae
Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.
In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.
RATIONALE
_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.
track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.
SPECIFICATIONS
Move all content of website event track session to website event tracK. It
was mainly of rewriting of views and can now be safely merged into the base
track module.
Update dependencies accordingly.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
PURPOSE
Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae
Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.
In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.
RATIONALE
_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.
track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.
SPECIFICATIONS
Move remaining content of website event track online to website event track.
Agenda notably is completely replaced by the new one developed within
track_online module.
Update dependencies accordingly.
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
PURPOSE
Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae
Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.
In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.
RATIONALE
_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.
track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_trackit.
SPECIFICATIONS
Quickly reorganize some bits of code in website_event_track module to ease
future integration of code from _online sub-modules. It also helps
understanding and finding its way through the module.
Split python files by model: notably event.track sub models inside their own
file to better follow future modifications.
Reorganize templates by main use
* _agenda: agenda view of tracks;
* _list: views of tracks, list-based;
* _page: a specific view of track, page-based;
* move side templates in side files;
* reorganize fields and add separators as this model will soon gain a lot
of fields;
* reorganize controllers to separate them by main use;
LINKS
Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
Followup of 69d2513de21c2e80de605f77912a3687b8a79c6d : fix computation of menu fields values to
be more inlined with base menu option (website_menu) + True by default when
activating menus.
Also force update when writing directly on a menu field to ensure coherency
of website.event.menu.
PR #55325closesodoo/odoo#55340
X-original-commit: 19d028aa885d5623ae98b26ad135a1b29c89d5ee
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
RATIONALE
Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.
PURPOSE
As new "Online Event" support is about to land, new and improved demo data
is necessary to showcase it. Improve online event demo data: have more tracks,
tags, colors, speakers, partners, descriptions, ... Make it WOW and AMAZING.
Improve demo data, especially track-related demo data: more tracks, better
datetimes, titles, tags, ... in order to have at least one event that looks
like a real event.
LINKS
PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
PURPOSE
Prepare Event Online support by providing fixes and preparatory cleaning
commits.
SPECIFICATIONS
As new Online Event feature is about to land new and improved demo data
is necessary to showcase it.
Add a new event for demo data that will be used to showcase the "online"
features to be added soon. Add some interesting demo on it: tags, tracks,
sponsors, ...
LINKS
Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944
X-original-commit: 553e835eb87a750312bed8e188b3ba82e811f7cc
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
RATIONALE
Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case
* using the template in the composer on a single record: it is displayed
in the rendered template in the composer, meaning people could change it.
This behavior is interesting as it allows to see the email content;
* using the template in the composer in mass mail mode: it is not displayed
as only the raw jinja is displayed. It is therefore not obvious that it
will be appended to the body of the mail. People could add it manually and
have 2 signatures as a result;
A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.
Behavior will therefore be
* use a template -> specify signature usage in it manually through jinja;
* do not use a template -> signature added in sent emails;
SPECIFICATIONS
Remove user_signature.
Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.
Quickly clean some signature integration.
LINKS
Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761
Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
This branch is the combination of several optimizations in the ORM:
* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;
* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;
* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);
* make method `modified` take advantage of inverse fields to inverse
dependencies;
* filter records by evaluating a domain on records in Python;
* a computed field with `readonly=False` behaves like a normal field
with an onchange method;
* computed fields are computed in superuser mode by default.
Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.
closesodoo/odoo#35659
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.
This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
`is_published` which would just go through the related for no reason.
Plus, using `is_published` will make the field tooltip more accurate as we
are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
related field, which is just a readonly when we are not in a frontend
context.
- Some create and write function would have security check on
`website_published` value but that was wrong as the user could bypass that by
simply writting on `is_published`. For the write method, check `is_published`
is more accurate as it will cover both case since `website_published` will
then call the write method on `is_published`
* Update demo data sheet for barcode
* Modify product "Book: Office Renovation for Dummies:
- Name: "eBook: Office Renovation for Dummies"
- Image:
- Internal category: All/Services/Saleable
* Tips internal reference
* Product 10.0 % Discount =
- Name : "10.0% discount on total amount" (no space between 0 and %)
- Internal reference : 10PERCENTDISC
* Free product - large cabinet
- Should be a stockable
- in category All/Saleable/Office Furniture
- Name : Free Gift - Pencil Holder
- Picture
* Desk Customizable :
- Change its website sequence (should be displayed first in the shop)
* https://github.com/odoo/odoo/pull/25263
* Need to clean attributes and attribute values and attribute categories :
- Attributes, keep : Brand, Color, Dimensions, Legs, Weight
- Attribute Category : Rename Storage into "Material"
* Events
- Suppress Functional Webinar and Technical Training
* PoS Categories :
- Suppress
- Create PoS Category : Desks (put desks in it)
- Create PoS Category : Chairs (put chairs in it)
- Create PoS Category : Miscellaneous (and put all other products in it)
* Products available in PoS
- Remove : Air Flight, Car Travel Expense, Bpost domestic bpack 24h pro, Bpost World Express Pro, Customer Care, DHL USA Delivery, DHL USA -> International, Deposit, Expenses, Fdex International, Fedexs US, Hotel Accomodation, Restaurant Expenses,
* Product:
https://drive.google.com/a/odoo.com/file/d/1KjxcB88aDfe8qAzIpFlkBmMj5ekA9eIf/view?usp=drivesdk
Timesheet : description to update https://docs.google.com/spreadsheets/d/1nB8l8pFcRXRFnudgDJVyZZp3McaHNovlyvY0jE1ZZ54/edit?usp=sharing
* Project : less projects, more tasks
Remove "Internal - GAP Analysis", "Internal Projects"
Rename Support into After-Sales Services
Task to rename: Data import + Doc ==> Office planning
Move the task Internal Training from "Support" to "Office Design"
* AGR Project : add the following tasks and link it to the right SO line
Decoration : SO Line ==> Senior Architect
Planning : SO Line ==> Senior Architect
Furniture SO Line ==> Senior Architect
Furniture Delivery : not linked to an SO line
* Marketing Automation
Partnership offer ==> to rename into "Commercial prospection"
Steps to rename:
Offer free trial ==> Offer free catalog
After 7 days (if not yet partners) ==> After 7 days (if not yet customers)
Message for sale person ==> keep the same
* Mass mailings:
http://nimb.ws/zrKsZ9http://nimb.ws/CbNpwd
* Events:
Suppress Functional Webinar and Technical Training
Tracks to update : https://docs.google.com/spreadsheets/d/1sKkJrltXY3Gz7ue3mVysZxaWGybKpx5fIhgUBnhbNDs/edit?usp=sharing
* Helpdesk
Rename team into Customer Care
Create 2 tickets in default team
Urgent : Kitchen collapsing (assigned to admin) : link to the task SO053: [SERV_585189] Customer Care (Prepaid Hours)
No pririoty : Where can I download a catalog ? (not assigned). Ticket type = question
Purpose of this commit is to enhance quality of templates proposed by Odoo
and make them use notification layout when send by emails. Those emails
are cleaner and more up to date compared to other emails.
Including
* registration and reminder templates that are send directly by email
are improved to directly include the notification layout in the body
itself;
* improve layout of badge template;
* use notification layout when sending badge;
* improve layout of track confirmation template;
* use notification layout when sending templates based on stage change;
This commit is related to task ID 51122 (and PR #24052).
Before this commit:
To know if an event menu is an auto generated one (eg: location, register..),
it checks if the menu name is the same as the hardcoded one in
_get_standard_menu_entries_names.
If user change the menu name, the code won't retrieve it and will act as if the
menu had been deleted and it will recreate it.
This leads to 2 bugs:
*First (website_event)
- Change menu name from website_event (eg: location, introduction or register)
- Check/Uncheck 'Track on website' or 'Track Proposals on website' to force
the code to rewrite missing menus.
- Go back to the event front end, theses menus have now been recreated, and
are duplicated.
*Second (website_event_track)
- Check 'Track on website' on event's back end
- Change the 'Talks' menu name in front end
- Go back to backend, 'Track on website' is unchecked because
_compute_website_track won't retrieve an event menu named exactly 'Talks'
Now:
We don't use euristics to try to recover missing menus.
We just create related menu when option is checked, and we delete them when
option is unchecked.
To know which menu item comes from which option, we store a value in a new
model 'website.event.menu'.
We don't want to try to check if the menus are all there and recreate them if
needed anymore. There is cases where user wan't to delete a menu and repace
it with a link to that menu's URL in the page content.
Before this commit, the option would've been unchecked since it won't
retrieve the menu.
This commit adds several event categories as data in event modules. The
purpose is to help people using the event application with some help
on event configuration done through event categories.
Purpose of this commit is to clean and ease the use of tracks in
event management.
* status is change to stages. Those are global for all event as we
consider track acceptation process as similar across events;
* change speakers many2many to a one2many. Most event have only one
speaker or at least a main speaker;
* add various chatter features: tracking of template, subtypes,
suggested recipients, ... Also add activities on tracks and their
various filters;
* add automatic mailing on stages like already done in tasks or
issues;
* tweak display of tracks on agenda. Event manager see unpublished
tracks with the right label in order to know the status of the various
event tracks.