When notification type is set as sms we need to check whether the template
which is referenced is coming from a correct model or not.
Applying this commit will fix this issue.
sentry-4195133685
closesodoo/odoo#125831
X-original-commit: 745bcab5ee524ae1c42e5773a86b15ef3a7019d3
Related: odoo/enterprise#42882
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
Steps to reproduce:
- Install `Events` module
- Create a new event and set it to `Autoconfirmation`
- Create a new attendee and confirm it
Issue:
Mail that confirm registration is not sent to attendee.
Cause:
When computing the `schedule_date`, it take the value of the
`registration_id.create_date` WITH the microseconds.
When creating a new attendee, at some point we run the mail schdelure
that compare if the `schedule_date <= now`.
`schedule_date` and `now` have same value except for the microseconds
(set on `schedule_date` but not on `now`).
Therefore `schedule_date > now` and the mail is not sent.
Solution:
Remove microseconds from the schedule_date.
opw-3079389
closesodoo/odoo#122188
X-original-commit: f2adca45dcec5a11daa92d07bae00615210ea0de
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Currently, only stable releases see their translations updated. This has
resulted in master accumulating outdated stuff for years, which can be
confusing for users testing master on runbot.
This one-shot commit resynchronizes master translations based on the
content from 16.0 and removes empty PO files (i.e. no longer containing
translations).
closesodoo/odoo#121629
Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
1. Install [Events]
2. On [Settings], create an admin for Events (uncheck all other rights)
3. Click on Events, enter an event
3. Click on [Communication] tab, and try adding a line
Issue: accessing ir.model is blocked
Solution: Find another way
Original fix in 15.0: #112527
Fix of the fix in 15.0: #115881
Original forward-port in 16.0: #115101
This commit is fixing the original forward-port in 16.0 and includes
the fix of the fix.
affected branch: 16.0-master
opw-3163138, 3193659
closesodoo/odoo#116438
X-original-commit: 38594f13586d95c8ed74593ea368e8b51826740b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
1. Install [Events]
2. On [Settings], create an admin for Events (uncheck all other rights)
3. Click on Events, enter an event
3. Click on [Communication] tab, and try adding a line
Issue: accessing ir.model is blocked
Solution: Find another way
Impacted versions: 15 - master
opw-3163138, 3103199, 3193659
closesodoo/odoo#115237
X-original-commit: db37a4e230f8cd6ac916fe3a21aea5ff43c61d53
Related: odoo/enterprise#38169
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
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.
closesodoo/odoo#114533
Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This API is much more sensible for making subqueries. Specifically, one
can generate a subquery without the clauses LIMIT and ORDER BY.
Part-of: odoo/odoo#112126
Remove most values uselessly specified because giving the same value as
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)
* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default
This will reduce noise/inconsistencies between manifests specifications,
simplify analysis of manifests content, ...
closesodoo/odoo#90209
Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
* = website
Change the wording of the sms reminder template to make it sound friendlier and
more complete. The sms will include the event address if it is defined.
Otherwise, it will link to the event page if website is installed.
A one line-formatted version of the venue is added to the model to be used in
the template and other places.
This required to update `event_registration.get_date_range_str` to not include
the time when describing an event happening more than a month from the current
date, which makes sense as there is no reason to specify the time only in that
case, and we add the time somewhere else when it's useful anyway.
For consistency, Wembley Stadium is updated to London timezone in the demo
data.
Task-2777183
closesodoo/odoo#85664
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently we have the record counter in sms composer wizard, that allows
us to select all the records with given active domain (so that instead of
just the records selected by user, SMS can be sent on all the records
matching the active domain).
However, now in standard, we already have a feature that allows user to
not only select records in the current page, but from all the records
matching the current domain in list view. So, in the SMS composer, the
feature to select all records is not much useful, and repeats the
information user already has.
With this commit, we remove this feature and it's related code, to make
the composer simpler and align it with what has been done for the
mail composer. We also improve the wordings for invalid phone number
related warning.
TaskID-2728556
Upgrade PR: https://github.com/odoo/upgrade/pull/3181closesodoo/odoo#82947
Related: odoo/upgrade#3181
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Purpose is to have a common event class for users and useful stuff (customers,
products, ...) but lessen usage of common test data through sub modules.
Indeed having a "global event type" test data updated in various addons is
actually complicated to maintain.
Sub add-ons are updated to use mainly the ``EventCase`` test class holding
users and side data. Data specific to those modules (event type with some
specific configuration notably) is created and used in tests in the given
module only, and not through generic event_type_complex and event_0 test
data anymore.
With this commit tests are more localized to their add-on and modifying data
in a given add-on has less chances to have unwanted side effect in other event
submodules unit tests.
Task-2703285 (Event performance improvements)
Task-2703289 (Event testing and coverage)
Part-of: odoo/odoo#81068
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
Communication on events is considered as standard: receive a confirmation
at subscribe and receive reminders. We therefore set default event mail
on both template and event models
* event.type has default communication with 3 emails;
* event.event has default communication when no event type is chosen. When
a template (event.type) is chosen its configuration is more important;
Task-2488019
PR odoo/odoo#68901
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.
closesodoo/odoo#74245
Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Purpose
=======
A new module "Event Social" will be added in the enterprise PR. This
new module will use a new template type, the "Social Post Template"
adding one more column in the communication tab...
We want to have only one column to select the template (Mail, SMS or
Post template) and therefor we need to use a reference field.
Technical
=========
As we can not set a domain on a reference field, we added a context key
and in the `_name_search` of the `mail/sms.template` we filter with the
domain we want if the key exists.
Links
=====
Task-2127615
See odoo/odoo/pull/46304
See odoo/enterprise/pull/7701
See odoo/upgrade/pull/848
PURPOSE
Purpose is to have more tests when sending sms mailings, notably about
canceled or failed mails or sms as well as jinja and links rendering.
SPECIFICATIONS
In this commit we improve SMS Marketing mailing tests. We notably
* add tests for void and invalid email and numbers. It allows to check they
correctly update their trace status;
* add tests for unsubscribe and view links embedded in sms marketing;
* add tests to simulate a click on links sent through sms marketing and
ensure click statistics are effectively updated;
* ensure content of sent sms are checked;
Default content of mailings used in test is updated to ensure jinja is
correctly rendered, including links and some corner cases. This will also
helps ensuring behavior is kept when converting to QWeb.
In event we now correctly use sms gateway mock to ensure SMS finding.
In link_tracker a helper is added to check url tracking in plaintext content.
LINKS
Task ID-2508643
Followup of odoo/odoo#68874 (improve mail tests)
Prepares Task ID-27033 (support QWeb in templates)
Prepares Task ID-2377974 (clean trace and status management in mass mailing)
COM PR odoo/odoo#69461
ENT PR odoo/enterprise#17780
X-original-commit: f1182b9da9aca9e67518fc10c240f3b21895a7ab
sms.template model has several record rules to give access to templates
linked to models managed by certain groups (like crm.lead for sales managers)
These record rules were meant to restrict access to certain model to create,
write and unlink, but not read.
This is leading to issues when trying to read a template on other models.
Indeed people should always be able read sms.template content.
Unit test were also added to the sms module to ensure that a member of
group_user can always read a sms template.
Unit test is added to ensure admin always has full control on sms.templates.
Task ID-2191254
COM PR odoo/odoo#68445
ENT PR odoo/enterprise#17340
X-original-commit: 6a00157f79be30a6efd6d039504c57be07c449fd
Purpose of this commit is to remove the "done" field computation. Indeed
it is based on either
* mail_sent field if scheduler is global to the event (before or after
event). This computation is light as this field changes only once
when emails are scheduled and sent;
* status of event registrations compared to all sent communication on
those registrations. This is costly as adding a new registration changes
In this commit we therefore
* rename ``done`` to ``mail_done`` to ease grep and understanding;
* remove ``mail_sent`` as it is integrated within ``done``;
* manually update ``mail_done`` when updating schedulers instead of doing
it through a compute method;
Some code cleaning is performed to make it clearer and easier to understand.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
Purpose
=======
Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".
Specifications
==============
Instead of the checkbox "sent", an event mail can have 3 values
1. Sent, if all the mails has been sent;
2. Scheduled, if scheduled but no attendee have been contacted;
3. Running, if not all attendees have been contacted;
Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.
A new widget is added that displays an icon depending on the state.
A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.
LINKS
Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
In this commit we ensure calling ``execute`` method on communication schedulers
do not send emails or SMS if their scheduled date is still not achieved.
Currently only the cron method does it (see ``run``).
It is now safe to call ``execute`` directly on event communication schedulers.
Related to Task ID-2414658
COM PR odoo/odoo#68158
X-original-commit: 353bc5de9fafbc1527c382614e02438ee799c8a4
The tests must be only imported in a test context, not in a running
context.
Since 92a7f8c13f a new test requirement was added but it should
not be necessary to run a module, only to execute the tests.
closesodoo/odoo#54578
X-original-commit: 15f2bbd40a70d9d9e969a2c75b7b9131c100dc09
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Modules holding tests and helpers
* link_tracker: mainly mock, asserts and tools for link tracker tests
(MockLinkTracker);
* mail: mainly gateway mock and base for mail tests
* MockEmail -> mocks for mail gateway;
* MailCase -> tools and asserts for mail tests;
* MailCommon -> base for mail functional tests);
* sms: mainly SMS gateway mock and base for sms tests
* MockSMS -> mocks for SMS gateway;
* SMS Case -> tools and asserts for mail / SMS tests;
* SMSCommon -> update of MailCommon with SMS capabilities);
* mass_mailing: mainly asserts and tools for mass mailing tests
* MassMailCase -> update of MailCase for mass mailing tools and asserts;
* MassMailCommon -> update of MailCommon with mass mailing);
* mass_mailing_sms: mainly asserts and tools for mass SMS tests
* MockMassSMS -> update of MockSMS for mass SMS tools and asserts;
* MassSMSCommon -> update of MassMailCommon with SMS capabilities);
Modules for tests
* test_mail: module for mail app tests (TestMailCommon);
* test_mass_mailing: module for mass mailing app tests (TestMassMailCommon);
* test_mail_full: tests integrating all discuss features, currently mainly
mail and SMS (TestMailFullCommon);
Enterprise: update test_mail_enterprise and test_marketing_automation
Task ID 2247037
Community PR odoo/odoo#50384
Enterprise PR odoo/enterprise#10266
Upgrade PR odoo/upgrade#1122
With this commit, Selection fields with `required=True` which are
extended via `selection_add` are given proper ondelete policies to
ensure the cleanup of records containing these extended options during
uninstall of the extending module.
This commit also cleans up leftover uninstall hooks that were being used
to handle the same set of problems prior to the ondelete mechanism being
implemented for Selection fields.
closesodoo/odoo#46325
Related: odoo/enterprise#9117
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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.
PURPOSE
As event will soon evolve (onchange -> compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.
SPECIFICATIONS
As event model grow in complexity and features, it is easier to find its
way through the application with having registration model lying in its
own file to separate it from event-specific models (event.type, event.event).
Ticket (event_sale) and sponsor (website_event_track) models are also extracted
in their own file.
LINKS
LINKS
Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656
PURPOSE
As event will soon evolve (onchange -> compute, code improvements, addition of
new features) cleaning and improving tests is necessary to help avoid issues.
SPECIFICATIONS
Clean existing tests: lessen data / variables, try to remove unnecessary
tests or merge duplicates.
Add new tests, notably event type configuration copy onto event records
is not well tested. Event computed fields are also more tested.
Some access tests are added, more a base for future addition as only a few
use cases are covered.
LINKS
Side effect of Task ID 2089156 (event onchange to compute)
Community PR odoo/odoo#43127
Enterprise PR odoo/enterprise#7656
PURPOSE
This commit 62ac23f0b9 introduced SMS capabilities on for
event.type.mail and event.mail models.
Values of event_type_mail_ids on event.type are supposed to be copied to
event_mail_ids on event.event when changing the event_type_id of an event.
There are however 2 issues with that integration:
- The 'notification_type' field was not correctly set on default
event_type_mail_ids on event.type;
- The 'notification_type' and 'sms_template' fields were not copied from
event_type_mail_ids to event_mail_ids;
LINKS
PR #39892
Task ID 2115792
closesodoo/odoo#41736
X-original-commit: 3fd66d844aa66ca8d54223071c787974e6c88c94
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Allow people to edit sms templates. Limit that rights to some main
application managers.
SPECIFICATIONS
SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)
Other groups
* Online Appointment NO TEMPLATE USED
* Accounting Manager NO TEMPLATE USED
* SMS Marketing NO TEMPLATE USED
* Studio Automated Action Need Technical Settings Anyway
* Scheduled Actions Need Technical Settings Anyway
* Server Action Need Technical Settings Anyway
LINKS
Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
PURPOSE
SMS are a powerful marketing tool. For instance it is perfect to announce a
sale or to communicate a coupon code, to welcome a new customer in a fidelity
program, ...
Purpose of this task is to integrate SMS sending in batch in mass mailing. It
will use same mailing objects but sending SMS instead of emails. Some metrics
and flows will have to be slightly updated at the same time.
SPECIFICATIONS
Clean the use and options of sms composer after FP feedback :
* see https://s.nimbusweb.me/share/3167586/ap1xpy95rz29a5cys576 as basis;
* globally, do not display invalid recipients, only valid / invalid count
as well as current selection / active domain counts;
* consider logging a note as default behavior when using the composer;
* simplify code: when doing a mass SMS, send SMS and attach a simple note
to the document;
Some other points
* make name of sms templates translatable;
* improve various wording, notably in sms widget;
* display error code in sms list view;
* update sms composer actions accordingly by correctly setting active id
or ids;
LINKS
Task 1997464
PR #34424
Original SMS addition: Task 1922163 (4287481)
PURPOSE
Allow the user to schedule SMS communication on events
SPECIFICATION
In event.event form view:
* rename tab 'Email Schedule' to 'Communication'
* add a selection field at the beginning of event_mail_ids with label 'Send'
and values 'Email' and 'SMS Text Message' (required with default value
'Email');
* add support of SMS template and SMS sending in event communication;
When sending SMS on event registrations, keep a log of what has been sent.
Use mobile or phone field of event registration as both may contain valid
values, like partner model.
Add SMS template data
* Name: Event: Registration (see data)
* Name: Event: Reminder (see data)
Improve registration model
* add a mobile field to the attendees form view: https://nimb.ws/p0VvyS
Technically this task uses the newly-introduced API methods allowing to
send and schedule SMS.
LINKS
Task 1922187
Part of PR #34705