Commit Graph
14 Commits
Author SHA1 Message Date
Thibault Delavallée 500b845b8a [IMP] mass_mailing_{event/event_track/sale}: add default mailing domains
When performing an email or SMS mailing on functional models a default domain
is a good start to avoid sending notifications to dead records, aka

  * canceled registrations;
  * canceled tracks;
  * canceled sale orders;

Task ID-2431217
COM PR odoo#67322
ENT PR odoo/enterprise#16876
UPG PR odoo/upgrade#2236

closes odoo/odoo#67322

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-26 07:57:47 +00:00
Thibault Delavallée ed508ee1bd [REF] mass_mailing: move mailing capability on model
PURPOSE

Remove hardcoded list of models on which mailing is possible. Indeed it is
not modular and not really smart with enterprise code not being reachable
in community.

SPECIFICATIONS

Replace hardcoded list of models on which mailing (both mail or sms) is
possible by a computed searchable field on ``ir.model`` based on a class
attribute.

It allows to cleanly define models having mass mailing capabilities and add
this attribute in bridge modules (when existing) or directly on base model
definition to avoid bridge modules.

In this commit we introduce a basic ``_mailing_enabled`` class attribute
activating mailing on model.

Mailing models may also have a ``_mailing_get_default_domain`` method allowing
to define a custom default domain when sending a marketing mailing on records
on this class.

Mailing models can now define a ``_mailing_get_opt_out_list(_sms)`` method
allowing to define custom behavior to fetch opt-outed records. Instead of
defining a model-based behavior on Mailing itself, it now calls the model
defined one. We still have two methods, one for mailing and one for SMS
opt out computation as it relies on different underlying models and fields.

LINKS

Task ID-2431217
COM PR odoo/odoo#67322
ENT PR odoo/enterprise#16876
UPG PR odoo/upgrade#2236
2021-05-26 07:57:47 +00:00
Patrick Hoste 3f45e782b7 [IMP] (mass_mailing_)event(_sms): adds send invitation button on event form
PURPOSE

Integrate the mass_mailing feature to event in order to send an
invitation to the event you organized.

Task ID : 2093336
PR : #43420
2020-02-04 14:48:31 +00:00
Thibault DelavalléeandAurélien Warnon 110decad00 [REF] mass_mailing(_sms): force domain reset when changing model / type
In this commit we rewrite the compute on mailing domain to simply reset it
once the mailing domain is changed. Indeed trying to keep a previous domain
based on try / except has no meaning from functional point of view. If model
changes then domain should change as it is a business record, not just a
technical domain to try to apply.

LINKS

Task ID 2088577
PR #41877
Enterprise PR odoo/enterprise#7278

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Aurélien Warnon <awa@odoo.com>
2019-12-16 15:58:16 +00:00
Rémy Voet ffe1d4047d [REF] mass_mailing: move from onchange / default to stored editable computed fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Normally behavior should be the same (computed or set by user), with support
in create / write + onchange without additional code.

SPECIFICATIONS

Update classic fields with onchange to stored editable computed fields. It
means their value will come either from manual user input, either computed
based on triggers. Purpose is to remove all onchange and default_get when
possible.

Clean fields definition inconsistencies, like default / required on computed
fields. Indeed computed fields should always have a value, maybe coming from
user input. They should not have default / required that are attributes for
classic fields.

LINKS

Task ID 2088577
PR #41877
Enterprise PR odoo/enterprise#7278
2019-12-16 15:58:16 +00:00
ryv-odoo 7087e969ca [FIX] sms, mass_mailing : fix some glitches, perform YAB2B
Specifications

  * sms, in the form view of sms composer : the count of all record doesn't
    match the reality in a multi-company environment. The search_count was
    done is sudo, then records of other company was taken in account in the
    count. Fix by explicitly setting fields as computer_sudo=False;

  * mass_mailing, in the kanban view of mail marketing : A warning ribbon
    ("insufficient credit") appeared on the kanban item of mass mailing, but
    the message was for sms marketing views only. Change the attributes to be
    invisible for mail marketing;

  * mass_mailing, in the form view of mail mailing : Weird default domain
    filter ([0 = 1]) was display instead of an empty domain filter;

  * mass_mailing_sms, in the test sms wizard, remove a duplicate error message :
    When the number format was wrong a duplicate error message pop up. Fix by
    simplify the model and remove useless computed fields.

  * mass_mailing_sms, in the test sms wizard, rename the label "Number" to
    "Number(s)" to show that it can multiples ones.

Task ID 2073016 (sms fixes)
PR #37185
2019-09-20 13:44:09 +00:00
Thibault Delavallée 49d2899fbd [REF] mass_mailing: rename mail.mass_mailing model
PURPOSE

Mass mailing is currently a bit messy. As SMS will be added as a way to notify
people in mass through SMS let us take this opportunity to somehow clean this
application: organization, light code cleaning, model renaming.

SPECIFICATIONS

Rename mail.mass_mailing model to mailing.mailing. Rationale :

  * mailing is now a prefix for mass mailing models;
  * mailing.mailing is easier to read / find / understand;

Note that mail.mass_mailing.campaign is not updated as it is likely to be
removed soon and replaced by simple utm.campaign model.

MIGRATION

mail.mass_mailing model -> mailing.mailing
mail_mass_mailing table -> mailing_mailing

LINKS

Task ID 2037906
Preparing task ID 1997464 (SMS addition in mass mailing)
PR #34938
2019-07-17 15:50:33 +00:00
Hiral Bhavsar 3cd7ed07a2 [IMP] *: remove 'view_type' on window actions.
The old tree views don't really exist anymore, this odd pseudo-flag to
dispatch between "list" and "tree" tree views has no reason to remain.

Task 1937686

closes odoo/odoo#31243

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-17 11:34:17 +00:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
Nicolas Martinelli ce6400e098 [FIX] mass_mailing_event: event domain
- Create an event, add an attendee
- Click on the stat button 'Mail Attendees'

The domain is shown as 'Event', '?', [id].

This is because the domain selector widget doesn't support the `in`
operator. Supporting it is not trivial, since ultimately `field_utils`
cannot parse a list of ids for a Many2one. It's less intrusive to change
the domain, since a standard use of the method will simply contain a
single id.

opw-1878322
2018-08-31 13:15:40 +02:00
Lucas Perais (lpe) dda2f0f861 [FIX] mass_mailing_event: keep default domain
Before this commit, when cliking on "mass mail attendees" on a event form
the default domain on the attendees for determining the mass mailing recipient
was lost in an onchange

After this commit, we retrieve the right domain

OPW 1869308
closes #26081
2018-08-02 09:35:29 +02:00
Yannick Tivisse 51b5ee7c3c [IMP] mass_mailing: choose model among all chatter models
This commit removes the strange selection box based on a magic flag and
some strange methods returning a string. Instead just allow to send mass
mailing on all models inheriting from mail.thread using the is mail
thread flag.

Various addons are updated to remove the _mail_mass_mailing class
attribute used to determine mass mailing capability.

We consider people could send a mass mailing on every model inheriting
from mail.thread. It makes no sense to limit it to a given set of addons.
2017-09-15 15:56:23 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Thibault Delavallée 7d3ffc294f [ADD] mass_mailing_event: add mass mailing UX on event for attendees
If the event has some attendees a button is displayed to launch a mass
mailing on those attendees. This button requires a new bridge module
between mass mailing and event.
2017-04-18 15:32:51 +02:00