Commit Graph
194 Commits
Author SHA1 Message Date
Hugo Carlier (Huca) ab809baca1 [FIX] *mail, mass_mailing_sms: take domain into account for activity
This commit allows to take domain into account for custom activity
groups in the systray.

Steps
=====
In debug mode:
- Install module mass_mailing_sms
- Add an activity for a mailing.mailing record with mailing_type set to
'sms' (i.e. a record visible in the SMS Marketing app).
- Add an activity for a mailing.mailing record with mailing_type !=
'sms' (i.e. a record visible in the Email Marketing app).
- Open the activity menu

Not in debug mode:
- Do the same step as above
- Click on the category "SMS Marketing" in the activity menu

Issue
=====
- In debug mode: a traceback will pop up when the activity menu is
opened with an error message similar to `Got duplicate key in t-foreach:
1182`.
- Not in debug mode: when clicking on the SMS Marketing category in the
activity menu, all records of model mailing.mailing with activities set
will be displayed and not only the one with mailing_type set to 'sms'.

Cause
=====
- In the method systray_get_activities, the id of each model is used to
create groups of activities. In mass_mailing_sms, the same logic is used
but two groups are created for the model mailing.mailing, thus with the
same id. This create a traceback in debug mode when displaying the
activity menu are the id of the groups are used as key for a foreach in
the view template.

- The methods openActivityGroup and onClickAction called when the user
click on an activity group (or on the activity icon next to it) do not
take the domain of the group into account correctly.

Fix
===
- The id key of activity groups is renamed in sequence
- The value of sequence is only used to sort activity groups on the
client side
- group_index is used as t-key value in the template of the activity
menu
- The domain of each group (if any) is combined with the domains used in
openActivityGroup and onClickAction

closes odoo/odoo#132402

X-original-commit: 1f154b4ba21e34c9021f07c5e62d8de460eb824e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-19 12:02:38 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Thibault Delavallée adfdf5ab33 [IMP] phone_validation: add a phone formatting tool on model
RATIONALE

Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.

SPECIFICATIONS

Add a '_phone_format' tool method on BaseModel. It allows to format a number
either directly, either from a field available on the model. It allows to
ease number formatting. It uses available helpers to find numbers using
'_phone_get_number_fields' and '_phone_get_country_field'. With default
generic behavior this allows to simplify most calls to phone number formatting.

Having it available at BaseModel level allows to remove some custom code,
calls to phone_validation API, ...

Task-3422449 (Mail, Phone: Move and improve field helpers)

Part-of: odoo/odoo#130468
2023-08-02 18:50:17 +02:00
Thibault Delavallée 626557147c [REF] various: remove duplicated sms helper tools
RATIONALE

Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.

SPECIFICATIONS

Simplify model custom code when dealing with phone and sms by using helpers
and standard behavior defined on all models.

'_sms_get_partner_fields' was introduced at odoo/odoo@bdebcab0ce to have a generic
implementation of finding partners on a record. Since then another version
has been added directly in 'mail' module, using '_mail_get_partners'.

'_sms_get_number_fields' was introduced at the same time to have a generic
implementation of finding numbers on a record. Since then a generic and
improved version has been added directly in 'phone_validation' module, see
'_phone_get_number_fields'.

Those method can therefore be removed, and replaced by the generic ones
available on BaseModel.

Task-3422449 (Mail, Phone: Move and improve field helpers)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)

Part-of: odoo/odoo#130468
2023-08-02 18:50:17 +02:00
Thibault Delavallée baf20910a2 [IMP] phone_validation: improve default phone fields heuristic
RATIONALE

Simplify field management for mail / phone / sms flows. Make it working out
of the box, easier to use and tweak.

SPECIFICATIONS

Support by default 'phone' and 'mobile' fields if present on model as phone
fields to fetch when searching for a number. This allows to remove several
of unnecessary overrides always doing the same thing.

Task-3422449 (Mail, Phone: Move and improve field helpers)

Part-of: odoo/odoo#130468
2023-08-02 18:50:16 +02:00
Louis Wicket (wil) 7da30c7d14 [FIX] mail, *: fix grammar error in field help
This commit fixes a really old grammar error in the help message of the
message_needaction_counter field.

Before this commit: “Number of messages which requires an action”
After: “Number of messages requiring action”

The subject of “require” is “messages”, which is third-person plural, so
it can't take the -s suffix.

closes odoo/odoo#129468

X-original-commit: 0d10cfeaa56d5df23df05f436d353978043f4a71
Related: odoo/enterprise#44509
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-07-25 17:36:08 +02:00
Julien Carion (juca) 6c412be2ea [IMP] *: coherent hotkey uses
This commit makes hotkey uses more coherent throughout the entire
codebase by setting alt+q as main shortcurt for confirm and default
actions and alt+x for cancel actions.

task-3370463

closes odoo/odoo#127469

Related: odoo/enterprise#43694
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-19 18:24:15 +02:00
Pratik Raval ee31690988 [FIX] mass_mailing{_sms}: fix A/B testing description
Before this commit
- When we were creating an alternative version in the SMS app for A/B
  testing, we were not able to see different options like select
  winner, compare version, etc in it because of ab_testing_mailings_count
  was counting only records with type equal to mail, in method
  _compute_mailing_mail_count. So, count will never increase
  and those buttons will never be visible.
- We were not able to sent the mail manually in auto mode.
- We were able to see the 'Send winner Now' and 'Send this as Winner'
  buttons even if no a/b test mail were send.

So, with this commit
- We have added the ab_testing_sms_count compute field in utm.campaign
  and ab_testing_sms_count related field in mailing.mailing to deal
  with the above problem.
- The auto mode can now send a winner manually.
- We introduce a new compute field is_ab_test_sent for computing
  whether the any sibling mails of a/b testing are sent or not,
  depending on that we hide / show buttons.

TaskId-2713198

Part-of: odoo/odoo#88997
2023-07-17 12:05:48 +02:00
tsm-odoo 65c8ea060a [FIX] mass_mailing: fix incorrect mark up in chatter
Markup usage has been enforced in the mail module since [1].

In mass mailing, a `Markup` array is joined usin the  string
method thus the resul is not marked up which leads to html
structure being printed to the dom.

This PR fixes this issue.

[1] https://github.com/odoo/odoo/pull/111850

closes odoo/odoo#123705

X-original-commit: 59f4cf98aadd6b740cbb1d9c92188ea1d708648f
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-05 16:17:12 +02:00
Achraf 1f8d14f8e1 [FIX] mass_mailing_*: Improve error handling for missing redirect URL
Handling of 'None' return value from 'get_url_from_code' to
prevent crashes in 'request.redirect'

https://github.com/odoo/odoo/blob/05fc9a67335d5a96752d828defa066d4fdabe301/addons/link_tracker/models/link_tracker.py#L248-L255

Apply same logic as

https://github.com/odoo/odoo/blob/c46f4b908a73658ce2aa7fd9987fbac76a0dda00/addons/link_tracker/controller/main.py#L21-L24

sentry-4183731887

closes odoo/odoo#122679

X-original-commit: d41684023c3845659ed2d96dd235128f4a12bdae
Signed-off-by: Achraf (abz) <abz@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-30 11:46:44 +02:00
Louis Wicket (wil) 04189318cc [I18N] *: update master translations
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).

closes odoo/odoo#121629

Related: odoo/enterprise#41171
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-22 17:52:07 +02:00
Brieuc-brd fa60bac197 [IMP] *: app icons : add viewBox attribute
Prior to this commit, the SVG's viewBox attribute was missing, which
prevented svgs from being scaled.

This commit fixes this issue.

task-3326633
Part of task-3326263

X-original-commit: 30300c373ad1c63a6cf8b035cae0785a09c6933f
Part-of: odoo/odoo#121886
2023-05-22 13:54:08 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Martin Trigaux 077bbd0b0b [I18N] *: export master source terms
closes odoo/odoo#121563

Related: odoo/enterprise#41140
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-17 10:34:00 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
stefanorigano (SRI) 46b762a1f1 [REF] web, *: milk colors
*: google_calendar, hr_holidays, hr_skills_slides, mail,
microsoft_calendar, point_of_sale, web_editor, website_livechat,
website_sale

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:12 +02:00
amdi-odoo 02ec80445b [IMP] mail,mass_mailing_sms,*: improve UI
*: phone_validation

- Add sample data in the mass_mailing_sms blacklist phone
numbers tree view.
- Update the mass_mailing_sms demo data so that, instead of
the sms being stuck due to a lack of credits, they are
all sent.
- Swap the mass_mailing_sms list view with the kanban view
so that the list view is the main one like in Email Marketing.
- Rename the reset mail template confirm button from "Proceed"
to "Reset Template" to make the action more explicit.

Task-3280602

closes odoo/odoo#119321

Related: odoo/enterprise#40120
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-05-05 17:06:23 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Martin Trigaux 69f911d994 [IMP] *: enforce usage of Markup in mail
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.

Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
  self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.

In
  self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer

Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.

closes odoo/odoo#111850

Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 16:39:48 +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
Louis Wicket (wil) 9afe7c74c9 [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#114533

Related: odoo/enterprise#37853
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-03-14 15:52:10 +01:00
Renaud Thiry 37348521ce [IMP] mass_mailing: remove A/B percentage limit
A/B testing was used in the past to create mutually-exclusive mailings.
Since then a 100% limit for the recipients of an A/B campaign.

As there is no technical reason for this limit and not having it allows
for a special usecase, it is replaced here with a text warning.
The usecase in question being that as the domain of the different
mailings composing a campaign may be different, users may want to
take advantage of the fact that only 1 email will be sent to each
address to avoid sending 2 mailings when only one or the other should
be sent. Consequently users may want to use 100% of the domain on
every mailing in their campaign.

As the ab_testing_total_pc is only used for that purpose the field
is removed. 'total' field  is not always accurate and is unused so
it is also cleaned up.

task-3008627

closes odoo/odoo#105639

Related: odoo/upgrade#4257
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-02-21 19:08:09 +01:00
Julien Castiaux 3d1f486bcc [IMP] *: update modules to use the new geoip API
request.geoip is no more a dictionnary cached in the session. It is now
a full blown object with lazy and smart geolocalisation capabilities.

Among other things, the previous dictionnary API is now deprecated. The
changes are:

* `request.geoip['country_name']` -> `request.geoip.country_name`
* `request.geoip['country_code']` -> `request.geoip.country_code`
* `request.geoip['city']` -> `request.geoip.city.name`
* `request.geoip['latitude']` -> `request.geoip.location.latitude`
* `request.geoip['longitude']` -> `request.geoip.location.longitude`
* `request.geoip['region']` -> `(request.geoip.subdivisions[0].iso_code if request.geoip.subdivisions else None)`
* `request.geoip['time_zone']` -> `request.geoip.location.time_zone`

It is safe to access all the attributes. Doing `request.geoip.city.name`
when the geolocalization failed (missing db, invalid address, ...)
evaluates to None. It does not raise an AttributeError.

Task: 2848206
Part-of: odoo/odoo#91337
2023-01-03 13:16:02 +01:00
niyasraphy 769aca56d3 [IMP] *: remove type from ir.ui.view records
closes odoo/odoo#108132

Related: odoo/enterprise#35031
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-19 11:33:47 +01:00
dht-odoo 6bfe126313 [FIX] mass_mailing{_sms}: respect mailing_type when comparing a/b mailings
Before this commit
- When we were comparing versions, there was no such filter as
  mailing type. Due to this it will display both SMS and mail
  type records in it.

With this commit
- We have added '('mailing_type', '=', self.mailing_type)' in domain
  of compare version.

TaskId-2713198

X-original-commit: e8542e24597ad25b68104c03d4d4ed41e1efac82
Part-of: odoo/odoo#107488
2022-12-08 13:38:24 +01:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Antoine Guenet b78385c02d [IMP] sms, mass_mailing_sms : port sms widget field to OWL
This ports the `sms_widget` field to OWL.

closes odoo/odoo#101350

X-original-commit: 89109de6d3752388f0b2f976c8a32588f760ec48
Related: odoo/enterprise#31882
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-09-28 09:38:56 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
Romain Estievenart 98a97d0fea [IMP] *: removes .form-group
this commit removes the usage of .form-group class which is deprecated
since BS5.

Here is the css rules that was used:

a) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L1997
As we can see, it simply adds a `margin-bottom` of `1rem` which
corresponds to the `.mb-3` BS class.

b) https://github.com/twbs/bootstrap/blob/8fa0d3010112dca5dd6dd501173415856001ba8b/dist/css/bootstrap.css#L2326
As we already checked all `form-inline` in [1] and [2], we don't have to
do anything about these rules.

'''Breaking change: Dropped form-specific layout classes for our grid
system.
Use our grid and utilities instead of .form-group, .form-row, or
.form-inline.'''

https://getbootstrap.com/docs/5.0/migration/#forms

Notes:
- `position: relative` is already on `#new-password-group`.
- `.field-db`, `#editor-media-image`, `.unsplash_img_container` and
`#url-form-group` seems unused.
- Sometimes margins are unnecessary because of blocks overlapping.
  (e.g. `margin-bottom` is not needed if margin-top is set on the
  following node)
- CSS rules applied on `.s_website_form_rows > .form-group` are now in
the XML by adding `mb-0 py-2` BS classes.

Follow-up of:
[1] https://github.com/odoo/odoo/pull/97967
[2] https://github.com/odoo/enterprise/pull/30343

closes odoo/odoo#100052

Related: odoo/enterprise#31261
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-09-16 20:51:56 +02:00
Sébastien Geelen (sge) d32a8c53c2 [IMP] web,web_editor,mass_mailing,sms: new dynamic placeholder
Introduce a new Dynamic Placeholder Generator
in mass mailing and SMS creation.

Using a specific character (#) in subject or via the PowerBox in body
we open a field selector popup, which can be use to select
the wanted field and enter a default value. on validation, the dynamic
placeholder will be inserted in the corresponding input/editable.

task-2154624

closes odoo/odoo#71878

Related: odoo/enterprise#30333
Related: odoo/upgrade#3766
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-08-26 17:16:10 +02:00
Denis Ledoux 0501bbd62e [IMP] base: uniform "groups" in back-end view
This revision is to make uniform the behavior of the `groups` attribute
on the Python model fields
and on the node in the view architecture.
In both cases, remove the node from the view completely.

Before this revision,

in a back-end view:
 - In the Python model, if a field has the `groups` attribute set
   and the user is not part of
   the groups, the field is removed, completely, from the view.
 - In the view architecture, if a node has the `groups` attribute set
   and the user is not part of
   the groups, the node is made invisible (not completely removed, just
   made invisible).

in a front-end view:
 - if a node has a "groups" or "t-groups" set and the user
   is not part of the groups, the node is removed from the view.

So it's 2/3 cases removing nodes restricted to a group.
and 1/3 case making invisible nodes restricted to a group.
It's simpler to have a uniform behavior for the 3 cases,
simpler to understandard for developers.

In addition, this will help for the goal to cache back-end views.
It makes possible to convert views using the `groups_id` field
by moving the content of these views directly
in the view to which they add content which is suppose to be completely
removed when the user has not the according group.
By getting rid of the `groups_id` many2many field on `ir.ui.view`,
it makes possible to cache the view architecture without
requiring to use the groups in the cache key.
Currently, if we want to cache the view architecture,
it would be required to use the intersection of the user
groups with the `groups_id` groups of the view,
making it costly to compute the cache key,
therefore altering the performance point to cache the view
architectures.

closes odoo/odoo#95729

Related: odoo/enterprise#29592
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2022-08-19 19:10:39 +02:00
ijas ahammed 0714966042 [IMP] {mass_mailing}_sms: add A/B Test related info in campaign
This commit adds a new group `ab_test_group` after notebook of campaign form
view, which displays A/B test related information. Below are the fields
displayed within the group:

 - ab_testing_winner_selection
 - ab_testing_schedule_datetime

They will become readonly as soon as the the A/B testing is completed.

Apart from that, this commit makes the mailing/sms mailing lines editable.

TaskID-2653806

Part-of: odoo/odoo#77768
2022-08-12 11:28:31 +02:00
ijas ahammed 87e538dd1d [IMP] {mass_mailing}_sms: update the embed tree view on campaign
This commit improves the embedded tree view of mailings, sms within
a campaign, and makes it uniform with the original tree views.

However, due to lack of space, we display the stats simply in
numeric format instead using progressbar widget.

Also, to save a bit space, if no mailing, sms has A/B testing
enabled, we hide that column.

Apart from that we have added sum for the field `sent` and average
for these fields,

- recieved_ratio
- opened_ratio
- clicks_ratio
- replied_ratio
- clicked
- bounced

TaskID-2653806

Part-of: odoo/odoo#77768
2022-08-12 11:28:31 +02:00
ijas ahammed d0f25aa59a [IMP] mass_mailing_sms: improve list view of SMS marketing
This commit improves the list view of SMS Marketing to make it
similar to Email Marketing. Now we have these fields in following
order:

- calendar_date
- subject (string updated to `Title`)
- mailing_model_id (optional hide)
- user_id
- campaign_id (optional hide, displayed when activated)
- ab_testing_enabled (displayed when activated)
- sent (added sum)
- clicked (updated string to `Clicked (%)` and added progressbar widget, average)
- bounced (updated string to `Bounced (%)`, optional hide with progressbar widget
  and average)
- state

TaskID-2653806

Part-of: odoo/odoo#77768
2022-08-12 11:28:31 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Sébastien Theys b401ba6e2d [IMP] mail, *: remove legacy code from activity systray
* = calendar, crm, im_livechat, mass_mailing_sms, note, test_discuss_full,
    test_mail

task-2920645

closes odoo/odoo#96114

Related: odoo/enterprise#29794
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-27 02:18:15 +02:00
Thibault Delavallée 039c63cf6e [REF][MOV] test(_mass)_mail(_sms): move sms tests in their own addon
In this commit we introduce a new module ``test_mail_sms`` that holds the
tests for sms application, like ``test_mail`` does for mail. Currently all
sms tests are inside ``test_mail_full``. After this commit code is moved
from ``test_mail_full`` into that module. Full testing module should be used
mainly to test integrations with a lot of submodules and for performance
tests, not testing details of SMS implementation.

We also add ``mass_mailing_sms`` as dependency of ``test_mass_mailing`` so
that both mailing types are tested in the same module. It eases maintenance
and writing of tests. Mass mailing SMS tests  from `test_mail_full`` are
therefore moved in ``test_mass_mailing``.

This commit also allows some cleaning in classes used in tests, to have
classes in ``test_mail_sms`` and ``test_mail_full`` that contain everything
necessary to test mail features.

Task-2890111 (Test Mail/Mass Mailing: SMS tests reorganization and move)

Part-of: odoo/odoo#96223
2022-07-19 11:51:12 +02:00
MAHAMADASIF ANSARI 6807eea38c [FIX] various: display full name/title in form views
With commit[1], we added `o_text_overflow` classes at several places to avoid
long names going out of the boxes. However, for the name/title fields in the
form views, we should always show the full name.

So this commit replaces `o_text_overflow` class with `text-break` from
name/title fields in the form views to display full string in the read
only mode, but also keep them from going outside of the form view.

Below are the modules affected:
 - base
 - coupon
 - crm
 - event
 - mass_mailing
 - mass_mailing_sms
 - project
 - sales_team

commit[1] - a0ebb46

task-2889845

closes odoo/odoo#96132

X-original-commit: 4a74c7af6b54bd771f50d3885813f4aae442c9e7
Related: odoo/enterprise#29552
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-07-18 18:42:03 +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
Pratik Raval 992ef282ac [FIX] mass_mailing(_sms): make 'Retry' button generate a cron trigger
When we use the "Retry" button in case of a failed SMS mailing, it puts
the mailing back to the queue, which will be processed when on the next
cron call of `Mail Marketing: Process queue`  (generally on the next
day). However, it should immediately generate a cron trigger in this
case so that SMS(s) can be sent right away.

The same goes for Email Marketing, where it should immediately generate
a cron trigger so the mailing can be sent immediately.

With this commit, instead of simply putting the mailing back to the
queue, we utilize the method `action_put_in_queue` which immediately
generates the cron trigger in both cases.

taskID-2760101

closes odoo/odoo#94269

X-original-commit: 572a7effb271ad134bb936751292668ae7b2b590
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-06-27 10:10:34 +02:00
grzana12 bbf936f40d [FW][FIX] mass_mailing: check fields for seen list are stored before going into SQL
Seen list (aka already mailed records) computation is done in SQL to speedup
computation. It is based on an heuristic to find fields to check (either
a partner, either an email). However it checks fields are present in model
but does not check they are stored. This leads to traceback if fields
are not stored.

Task-2852943

X-original-commit: fa11070d4533475778ea933225e30d06a09406bc
Part-of: odoo/odoo#94532
2022-06-24 15:00:54 +02:00
Martin Trigaux 5acb6db891 [I18N] *: export saas-15.4 source terms
closes odoo/odoo#93246

X-original-commit: 5ff6d185f70650c26c28a6aef7dd37c859ab58d2
Related: odoo/enterprise#28218
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-06-10 07:27:26 +02:00
Thibault Delavallée 4f39a80e76 [MOV] mass_mailing(_sms): split models and views
PURPOSE

Reorganize addon according to guidelines, helping finding and updating code.

SPECIFICATIONS

Move subscription model into its own file, to ease future improvements. Do
the same for its views.

Also move menu entries into a specific file for menus, allowing to easily
understand menu organization in mass mailing.

A duplicated menu about link trackers in SMS is also removed.

Task-2864264 (Mass Mailing Module Reorganization)

Part-of: odoo/odoo#92509
2022-05-31 16:02:24 +02:00
Thibault Delavallée 19b02759ca [LNT] mass_mailing(_sms): perform various linting
PURPOSE

Reorganize addon according to guidelines, helping finding and updating code.

SPECIFICATIONS

Perform various code linting and cleanups, line breaks, linter issues...
No code or feature change should occur with this commit.

Task-2864264 (Mass Mailing Module Reorganization)

Part-of: odoo/odoo#92509
2022-05-31 16:02:24 +02:00
std-odoo 56de864c8b [IMP] mass_mailing: improve the mailing list Kanban view
Purpose
=======
This commit rework the design of the Kanban view of the mailing list.

There are now 2 styles for this Kanban view
- Grouped, for this one we keep the same "card design" as before
- Ungrouped, we use a "list style" view, and the card take the all
  width of the screen

Add some actions to be able to import quickly contacts from this view
or to send a mailing to the mailing contact list.

Task-2737782

closes odoo/odoo#86587

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-19 12:28:04 +02:00
Pratik Raval e77578550c [IMP] mass_mailing_sms: make sms_subject non translatable
PURPOSE

Oversight of: 0ba617ca87

That changed the mailing.mailing "subject" field to be non-translatable.

We forgot to also modify the "sms_subject" field in the mass_mailing_sms module
that is simply a related on "subject".

REFERENCES

More details about that related "sms_subject" field and its purpose:
f4bb3b77f2bf4749205ca83262623d304f7d7409

LINKS

Task-2845396

closes odoo/odoo#90733

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-05-18 08:43:50 +02:00
Patrick Hoste a4ab4de2ff [IMP] mass_mailing(_sms): set mailing contact list view multi editable
PURPOSE

Set the mailing contact list view multi editable. The editable fields
are 'title', 'country' and 'company name'. Along with that we add the
optional fields 'title_id' and 'country_id' to the view.

LINKS

Task-2832509

closes odoo/odoo#90184

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-12 23:08:41 +02:00
Florian Charlier b0f233ba86 [FIX] link_tracker,mass_mailing_sms: fix shorten links
Purpose
Fix bugs in link replacement (html and text version)

1/ The replacement of urls in text (not html) was buggy when
* a string includes multiple urls, and
* `base_url` is one of them and not the first
* Also in SMS marketing when adding the sms `id`

When it came to base_url's turn, the replace function for the content would
replace the `base_url` part of a previously shortened url instead of the
distinct `base_url` link.

2/ Ampersand character
A) The ampersand character prevented replacement of an url inside a `Markup`.
Previous tests passed as the tracker was created but the url was not replaced.

B) The ampersand character was not recognized as part of an url for simple
strings.

3/ Replacement of already short links
A faulty logic made it possible to replace "/r/" urls when no "blacklist" was
passed.

Commit
* Ensures that only the base_url link would be replaced instead in this case.
* Adds support for urls with "&"
* Does prevent shortening short urls
* Improves link conversion performance (regex + avoid duplication when there
  are several occurrences of the same url)
* Adds multiple unit tests

Task-2783844

closes odoo/odoo#91164

X-original-commit: 61026806d831b49a7cf5c44ffef3d762986781ce
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-05-12 13:43:17 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
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, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
Victor Feyens 835f07c7d4 [FIX] mass_mailing(_*): Using an f-string that does not have any interpolated variables (W1309)
Part-of: odoo/odoo#86332
2022-04-27 07:51:24 +02:00