Commit Graph
63 Commits
Author SHA1 Message Date
Jérémy Hennecart (jeh) 8b64f9dd4e [IMP] calendar: add resources and capacity info on template
Add the list of resources and the capacity when booking an appointment type.

task-2453291

closes odoo/odoo#120023

Related: odoo/enterprise#37220
Related: odoo/upgrade#4585
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-12 19:54:28 +02:00
Louis Wicket (wil) 0c53d28133 [IMP] *: remove "French spacing"
According to Wiktionary, French spacing is "the archaic practice (though
still current in French) of inserting a space around colons, semicolons,
question marks, and exclamation marks". This is not standard practice in
English and most languages of the world.

The purpose of this commit is to start purging the code from this typo,
as it may reflect poorly on the software for some people.

closes odoo/odoo#116167

Related: odoo/enterprise#38542
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-24 12:50:13 +01:00
Leonardo Pavan Rocha 7f4e00146d [FIX] calendar: fix form view email button giving traceback
After https://github.com/odoo/odoo/pull/99386, clicking on the email button in
calendar.event form view would give a traceback as it tried accessing event_id
on a calendar.event record. This commit fixes this error as the object in the
template already is an instance of calendar.event.

task-3127534

closes odoo/odoo#109549

Signed-off-by: Arnaud Joset <arj@odoo.com>
2023-01-10 16:51:03 +01:00
mafo-odoo 13378c4659 [IMP] calendar: add default data and signature to event mail template
Issue:
When visualizing the calendar event update mail template there is few
or no default data. Unlike the other calendar mail template there is
no signature.

opw-2968890

closes odoo/odoo#99386

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-11-02 10:40:08 +01:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
MAHAMADASIF ANSARI 19183d9f2f [IMP] calendar: improve the mail templates related to appointment
This commit done below changes:

- Change the "Meeting URL" label to "How to Join".

- Change the "https://meet.jit.si/odoo-xyz" label to
  "www.mycompany.com/calendar/join_videocall/xyz".

- Adds the label "Join with Odoo Discuss" if the `base_url` is found
  in `videocall_lcation`, otherwise "Join At" instead of simply showing
  the meeting URL in calendar event related mail templates and moves the
  meeting URL to the bottom of this label.

- To avoid a tiny calendar badge, add style `min-width: 130px;` to the
  calendar badge.

taskID-2821957

Part-of: odoo/odoo#92628
2022-08-12 17:05:42 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
MAHAMADASIF ANSARI e2429999fe [FIX] calendar: remove description_to_html_lines method reference
With commit that replaced most of the text fields to HTML fields (see
commit[1]), the `description_to_html_lines` method was removed from
`calendar.event` model and linked templates. But another commit[2]
merged afterwards introduced a mail template that used this method,
due to which the rendering used to crashed.

This commit adapts the template and thus fixes the crash while
rendering the template.

commit[1] - https://github.com/odoo/odoo/commit/cb4f597410bcb08208ee277144d755bef8b6d688
commit[2] - https://github.com/odoo/odoo/commit/40fd44f618cb54d8c75b8c090cc36655316aa825

task-2821957

closes odoo/odoo#91280

X-original-commit: 71b9e36f5c5e36f13f26bf74038ddb736d5e25de
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-13 09:51:11 +02:00
Jérémy Hennecart (jeh) d248f5afce [FW][FIX] calendar: use the event_tz in mail templates
Try to use the event_tz before falling back on the mail_tz (user tz) in the
context. Add a tool method allowing to override this behavior easily instead
of concatenating "or". As template is modified anyway translations are already
broken.

Task-2699765

closes odoo/odoo#86513

X-original-commit: odoo/odoo@6ef642ccdc
Part-of: odoo/odoo#86070
Related: odoo/enterprise#25322
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-03-16 16:07:27 +01:00
Rémy Baranx (bar) fe4c65df23 [FIX] calendar: email calendar event attendees
When clicking on the "email" button in the `calendar.event`
form view, the `email_to' field should be filled with the list
of attendee email addresses separated by a comma.

opw-2667016

closes odoo/odoo#81857

X-original-commit: 87e913b892c2518a716fceb247b57ab8c955a07f
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-16 08:56:31 +01:00
Rémy Baranx (bar) 0b9260e55e [FIX] calendar: fix mail template
Some `<t>` tags used an old syntax `t-set="var = something"` which
seems not accepted anymore by the template compiler.
The actual syntax is `t-set="var" t-value="something"`.

closes odoo/odoo#86002

Task-id: 2768714
X-original-commit: 09f328e740ca87fd01ed1d5478da2de27b792aae
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-03-08 11:03:51 +00:00
Mitul Shah dc5b7ecbf8 [FIX] calendar: remove the 'With Username' in meeting invitation email
Before this Commit,
While creating a custom appointment, The appointment name has 'Username'
and invitation email also has 'Username'. When a customer receives the
invitation email, The 'username' gets twice.

After this Commit,
We have removed the 'With username' part from the default email template.

Task-2713963

closes odoo/odoo#82894

Related: odoo/enterprise#23197
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-04 13:06:54 +00:00
Thibault Delavallée 0afbba8b5b [FIX] calendar: fix recipient of "event update" template
This template runs on calendar event records. It can therefore not really
use 'email' as field to compute a To. Let us void this field as it is used
mainly for a backend action that sets recipients.

Task-2657930 (Email templates fixup)

closes odoo/odoo#79895

X-original-commit: 5b3ad80f427fc2ac0e91622a94f0f63b3d2bf721
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-11-17 08:26:25 +00:00
Arnaud Joset de183583b2 [FIX] calendar,google_calendar: send correct datetime for events in recurrences.
google_calendar: before this commit, the timezone of recurring events was not properly tested.
when an recurrence was created in Odoo, the start and stop datetime were incorrectly set before https://github.com/odoo/odoo/pull/76546/commits/182f0cab58dd4e8a8ce1a3af5eaf8c3d8bea51e6. This commit test this behavior.

calendar: add recurrence information in mail invitation
https://github.com/odoo/odoo/commit/bc9bc2686ca142a7348dc48e0b7f8e74fdd42e10  removed the recurrent template variable that is used to add recurrence information in the mail invitation.

FW port of https://github.com/odoo/odoo/pull/76546

closes odoo/odoo#77559

X-original-commit: e1d1e9ee20e6de4c9b9873e533ff9c89d7b392ef
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-10-01 10:09:47 +00:00
Nicolas Bayet 4813f42997 [IMP] mail,*: replace jinja with qweb
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
2021-09-28 23:42:54 +00:00
Arnaud Joset 40fd44f618 [IMP] calendar,google_calendar,microsoft_calendar: Improve UI
Before this commit, the calendar UX was not good enough. The look and feel was not modern.
This commit improves a lot of small details, remove unneeded or not mature features (like the videocall location url).

Counted recurrence now brings a better experience. When weekly or montly recurrences are created, occurences in the past are dismissed but before this commit their number was not adapted.
User would end up with less occurences than the provided number without explanations.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:21:02 +00:00
Arnaud Joset 24a36c6c8f [IMP] calendar: rename calendar.contacts model
Before this commit, the 'magic' model calendar.contacts name was misleading. This model is only used to save calendar view preferences in the calendar app.
As the calendar events are already mentionning attendees, partners, users, the 'contact' name for a technical field was confusing.

Taskid: 2484335
Part-of: odoo/odoo#68700
2021-08-26 10:20:59 +00:00
dht-odoo c23a95a9ec [FIX] calendar: fix description integration in mail templates
Followup of odoo/odoo@cb4f597410 and odoo/enterprise@971f3ed9ae

This commit will improve mail template design by adjusting description section
of template.

LINKS

Task Id-2558824
PR odoo/odoo#74795
PR odoo/enterprise#2011
2021-08-18 08:26:14 +00:00
Munaf Khan 292ffeec00 [FIX] various: avoid scroll for button(s) within mail templates
Right now, for notifications handled by odoo (which are being displayed on
discuss app / object chatter), few of the buttons have unexpected scroll
(mostly the CTAs that redirect to record / portal views) and ruins the UI.

This commit fixes the issue by improving such templates by using proper
paddings on the button.

TaskId:2518863

closes odoo/odoo#70083

Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-15 08:34:37 +00:00
dht-odoo dbf1ab157d [IMP] calendar: improves field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

Adding a new method convert_online_event_desc_to_text
Because online events have fixed format for the description,
this method removes some specific html tags, and converts it into
readable plaintext (to be used in external calendars).

Models -> Fields

1) calendar.event -> description

Task Id: 2499504

X-original-commit: 0d5ca6a6fe8821b4ec19dd603bde116518721792
2021-06-07 05:24:08 +00:00
Jérémy Hennecart 4a616e1ab1 [IMP] calendar(_sms): add template selection on reminders
The purpose is to allow the user to have the opportunity to manage what is
going to be send as reminders. He can now access to the template or create
a new one when the type of reminder is email or sms. In case of a simple
notification, a new text field is added to add custom content.

Task ID-2191254
COM PR odoo/odoo#68443
UPG PR odoo/upgrade#2313

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-30 12:15:00 +00:00
nounoubensebia ad602bba0c [FIX] calendar_event, tools: appointment time mismatch
add mail_tz to calendar_attendee model in order to make it easier to change the
timezone displayed in the mail template so that we can use it to make the
appointment time shown on the email reminder sent to the attendees consistent
with the time shown on the website page.

Change the invitation mail template and use the mail_tz field to display time
field instead of using the partner's timezone in order to make the time shown
in the invitation consistent with the time shown on the website page.

Remove the get_interval method in the calendar_event model and use standard
formatting tools instead, as this is more conveniant than having a custom
method for formatting dates, For this reason the format_time function located
in tools/misc.py has been modified to be capable of handling timezones in
order to be able to display time in the correct timezone, furthermore, this
function has been added to the rendering context provided in the
mail_render_mixin file to be used in email templates.

see: https://github.com/odoo/enterprise/pull/16204

Task-2451154

closes odoo/odoo#65729

Related: odoo/enterprise#16204
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-30 13:17:07 +00:00
Krupal OzaandThibault Delavallee bc9bc2686c [IMP] calendar: improve main data templates
Purpose of this commit is to make templates easier to preview and edit as
weel as to improve their content.

This is achieved notably by lessening use of custom rendering context and
trying to fix as much error-prone jinja statements.

In this commit we also make ``calendar_template_meeting_reminder`` template
looking more like other templates. There were some rendering differences that
do not seem really wanted.

``calendar_template_meeting_reminder`` was also using an old ``force_event_id``
key not replaced by recurrent_id field on attendee.

This commit improves few strings of the invitation mail being sent while
booking an online appointment. Online appointment is computed based on
``appointment_type_id`` field being defined. Some tweaks in wording made it
necessary to know if recipient is the responsible, customer or an added
attendee on the event, leading to some tooling code added on event model.

The main changes includes

 * for customer, remove the CTAs to accept / decline event as attendee are
   automatically set as accepted;
 * depending on recipient, improve wording of the mail accordingly and mention
   appointment type in the mail;

Task ID-2199620
COM PR odoo/odoo#64925
ENT PR odoo/enterprise#15914
UPG PR odoo/upgrade#2282

Co-Authored-By: Krupal Oza <koz@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
2021-03-24 15:16:42 +00:00
Julien Castiaux 193fee519c [FIX] calendar: missing cron compat fom sms_calendar
Fine tunning of c8f031ad77, this commit has the missing code
compatibility for sms_calendar.

closes odoo/odoo#65064

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 15:38:24 +00:00
Julien Castiaux c8f031ad77 [IMP] calendar: schedule reminders using triggers
The calendar reminders are emails or web notifications sent moments
before an event start. The mechanism to send web notifications is
controlled by the browser, it fetches all the future notifications and
uses `setTimeout()` to delay them. The mechanism to send emails was
controlled by a cron, every 30 minutes the cron would look for the
coming events and send the mail reminder.

The cron was running every 30 minutes even if there was no event. The
best precision was 30 minutes.

The new mechanism use cron triggers, every time one add email reminders,
triggers are created to call the cron at the precise moment the alarm is
set. The cron no longer send emails for events in the coming 30 minutes
as those will be triggered too.

closes odoo/odoo#64560

Task: 2416741
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-01-18 15:57:41 +00:00
Julien Castiaux cbf00ae8ee [REF] calendar: remove cron activation code
There is code that automatically enable or disable the cron whether it
exists alarms. As alarms are automatically added, the cron is actually
always enabled.
2021-01-15 18:58:12 +00:00
Kevin Baptiste 61e9b6ac4e [IMP] calendar: add link to join video call
This commit adds a link to each calendar.event to join a video call
hosted on Jitsi.

The domain of the Jitsi instance can be configured using the
configuration parameter `website_jitsi.jitsi_server_domain` (defaults to
meet.jit.si).

TaskID: 2367543
2020-12-09 10:16:44 +01:00
Thibault Delavallée 6c6adbad66 [MOV][IMP] auth_signup, calendar, gamification: reorganize qweb / jinja templates used for mailing
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
2020-11-25 12:31:10 +00:00
Nicolas Galler 09782ba740 [FIX] calendar: invalid accept link in reminder email
Behavior prior to the commit:

- the accept link in the reminder email for a meeting has a parameter
`event_id`, instead of `id`, which causes an error 500 when the user
tries to accept the meeting

Behavior after the commit:

- the accept link uses the correct `id` parameter

opw-2366173

closes odoo/odoo#62087

X-original-commit: a1073325ed7cb231dcce27c8b2d2df67821bbdf4
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2020-11-20 16:58:10 +00:00
Martin Trigaux e433bc57ff [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#61804

X-original-commit: f5d0f4a1ebf406583889e9e04912d40c0693343e
Related: odoo/enterprise#14769
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-16 16:47:28 +00:00
Yannick Tivisse 1a9be3a869 [REF] calendar: Lint + Clean code 2020-04-09 10:59:34 +02:00
Lucas Lefèvre 658c062e6d [REM] calendar: Remove useless state field
This commit removes the `state` field of calendar events.
The field was not displayed on any view and never used by any business code.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006
2020-04-09 10:56:37 +02:00
Lucas Lefèvre 7159f657a0 [REF] calendar: Refactor calendar attendees management
This commit refactors the event attendees and notifications according
to the recurring event refactoring.

Some (very) basic reminder tests are also added.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006
2020-04-09 10:56:37 +02:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
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>
2020-02-11 14:01:13 +00:00
Nicolas Martinelli 51f90541bf [FIX] calendar: round duration
When a calendar event is created with a duration of for example 20
minutes, the end time appears as the start time + 19 minutes.

Because of the rounding of the duration (20 minutes = 0.333... hours),
the end time is incorrectly set (xx:19:59.998...) then displayed. Since
the duration can only be set by the minute, we round it before computing
the end time.

opw-2122853

closes odoo/odoo#40655

X-original-commit: f6ae9f0aea5a250cbff6734de8a43a1b741394a7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-21 17:04:47 +00:00
fw-bot c5570c4e7d [FIX] calendar: fix wrong date for recurring event emails
Reproduce this bug

    - Install Calendar
    - Create a recurring event starting at the date of yesterday
      (later than your actual time)
    - Set the recurrency to every day, 1 time (today)
    - Click on the today's event
    - Add attendees > Invitations > Send mail
    - Run the mail queue manually (Technical > Scheduled actions)

    The mail you sent are for the date of yesterday
    The behavior is the same for the reminders

Cause

    The mail are sent with the `_send_mail_to_attendees` method
    who pass the attendee_id to the templates.

    The `attendee_id.event_id` is always the first one.

This commit pass the correct event to the template via the context.
I replaced only the dates values in the template.

closes odoo/odoo#40320

X-original-commit: 1926c6cfea0e21842fbd71fd85629b13fce9b413
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-15 10:30:01 +00:00
Raphael Collet 9920f20e4c [IMP] models: ORM speedup
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.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-08-20 12:43:59 +00:00
Yannick Tivisse 14067543d0 [IMP] uom: Remove parentheses on uom names
Purpose
=======

Parentheses in the label of units of measure sometimes make
reading needlessly uncomfortable.

Specification
=============

Remove parentheses in the name of every standard uom.uom and hardcoded
occurence on views/field names.

TaskID: 2030444

closes odoo/odoo#34492

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-15 12:57:34 +00:00
Christophe Simonis 8dd5a85267 [MERGE] forward port branch saas-12.3 up to 60e71302a3 2019-05-13 15:26:12 +02:00
Denis Ledoux fd0a10026c [MERGE] forward port branch saas-12.1 up to b11930047f 2019-05-02 09:45:14 +02:00
Christophe Simonis 15b8d353c7 [MERGE] forward port branch 12.0 up to 2830b93a3a 2019-04-17 19:47:37 +02:00
Lucas Perais (lpe) 06b3a290f5 [FIX] calendar: templates with right lang
Before this commit, the standard mail templates for calendar
did not have a language

After this commit, we set it to the the partner's language

OPW 1946686

closes odoo/odoo#32717

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-16 11:43:35 +00:00
Hetal Dhanak f711e6d6a2 [IMP] calendar: Improve calendar alarm computed name
Improve usability of fields 'reminder_ids' (calendar.appointment.type)
and 'alarm_ids' (calendar.event)

If the user does not set a meaningful 'name' on a newly created calendar.alarm,
it is a pain to select the desired record from those fields.

(Also, user should be able to edit existing calendar.alarm)

Related Task ID: 1923205

closes odoo/odoo#30129
2019-02-07 12:48:12 +00:00
Thibault Delavallée 678e04c19d [FIX][IMP] various: improve lang computation in mail templates
Purpose: add lang definition on templates where it is missing

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.

Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.

Related to task 1972615
Linked to PR #32872
2019-04-23 14:26:50 +00:00
mreficent 4f9afa6a64 [REF] calendar: rename calendar.alarm type to alarm_type
Purpose of this commit is to rename type column to something matching the
the real business use of the field. That way it is easier to find and grep
in the code. It also lessens potential conflicts with type build-in python
function. It also lessens conflicts when using the field in JS as type
is a build-in attribute.

Renaming type column is a long-living issue. We choose to do it at the
beginning of the v13 development to catch errors as soon as possible.

This commit is linked to task ID 1896245. It is also a subpart of community
PR #27599.
2018-10-19 09:12:55 +00:00
Xavier Morel e1837721a8 [FIX] *: reassociate various demo data to admin instead of root 2018-09-24 15:55:06 +02:00
Pratima Gupta 8915223517 [IMP] calendar: make templates more modern and updated with Odoo guidelines
In this commit we improve templates used in calendar. Purpose of this commit
is to have templates that embed or use standard Odoo email layouts to make
them look modern and have a common style across all emails.

Main guidelines

 * better use of div / p / br to try to lessen layout issues, especially
   when updating templates using the editor;
 * correctly sequence the templates fields definition;
 * correctly set templates values notably auto_delete and user_signature
   fields to avoid confusion;
 * correctly layout the email content using light notification email. It
   can either propagate the layout choice through various send mail methods
   or directly embed the styling in the templates for more technical or
   complex templates;
 * use email_formatted computed field when possible to avoid having hand-made
   from / to addresses;
 * fix various typos and improve subjects when necessary;

Content of emails is not necessarily updated as the purpose of this task is
about styling, not content itself.

This commit is linked to task ID 1843136 (and 1868112) and to PR #25412
(and #25889).
2018-07-24 15:33:22 +02:00
Pratima Gupta a35a7f5931 [MOV] calendar: move mail data in their own files
It lessen noise on other data when updating templates. As they are subject
to frequent changes it is better to have them located in a single file.
It is also easier to find when searching for mail templates. This allows
calendar to comply more with the guidelines.

By the way also remove a falsy comment in calendar data.

This commit is linked to task ID 1843136 (and 1868112) and to PR #25412
(and #25889).
2018-07-24 15:33:22 +02:00