35 Commits
Author SHA1 Message Date
Cédric Krier 24fd5e11de Enforce access rights on the email template record of marketing automation
Closes #14907
(grafted from 5c64e83a573ce01423a4d65a25fe704b39a43306)

--HG--
branch : 8.0
2026-06-30 23:02:59 +02:00
Cédric Krier 84c47a0433 Support mounting application under a prefix
Closes #9239
2023-11-12 23:44:43 +01:00
Cédric Krier 5310b00496 Remove grouped_slice per IN_MAX
The usage of ``grouped_slice`` without size is deprecated since `=
ANY(ARRAY[%s])` is used for PostgreSQL and SQLite is used only for tests.

The ``Database.IN_MAX`` is replaced by ``backend.MAX_QUERY_PARAMS`` which is a
more accurate limit of the backend.
The SQLite limits is indeed SQLITE_MAX_EXPR_DEPTH so we use a empirical value.
2026-03-22 21:05:26 +01:00
Cédric Krier 0da67bce21 Deprecate reduce_ids for SQL_OPERATORS['in']
Closes #12989 #13897
2025-12-26 10:57:44 +01:00
Cédric Krier 7fb5a4a3de Do not use Literal to count in SQL
The * is not actually a parameter of the aggregate function so it is better to
let python-sql manage it with its default value.
2025-12-25 09:47:23 +01:00
Cédric Krier 6f8abf2d5f Show email buttons of marketing record activity when the state is done
The email is sent only when the record activity is in the state done so the
buttons must not be available in any other state.

Closes #14597
2026-02-10 17:53:53 +01:00
Cédric Krier 592e09d67e Support MJML syntax for marketing email 2025-12-11 15:20:11 +01:00
Cédric Krier 2989e66585 Lazy import html2text and weasyprint 2025-12-11 17:57:01 +01:00
Cédric Krier df6b94b866 Test the record reference of marketing automation record before execution
The reference field is on the record and not on the record activity.

Closes #14281
2026-01-10 18:39:18 +01:00
Cédric Krier 74ee169c54 Refactor of trytond.config to add cache
This removes the need to store configuration in global variable and so make it
easier to update for example for testing.

Closes #14249
2025-10-07 08:19:57 +02:00
Cédric Krier 5aeff66acd Use ModelStorage hooks instead of extending create/write/delete 2025-04-06 00:14:17 +02:00
Cédric Krier 7917793f94 Search waiting marketing automation record activities using record ID
There is no custom search_rec_name for record, so all the records are valid.

Closes #13787
2025-01-01 19:07:43 +01:00
Udo Spallek 8b252472c4 Replace usage of docstring of Model by __string__ attribute
Closes #8402
2024-11-19 10:09:52 +01:00
Cédric Krier e16889a592 Use sparkline tools instead of pygal 2024-09-29 11:46:53 +02:00
Cédric Krier 8f96e4af72 Unify email terminology
Closes #13463
2024-08-22 09:52:06 +02:00
Cédric Krier a2dfc4455b Refine index definition
- Set low and high cardinality to index usage
- Use Range usage for numerical expression instead of Equality
2024-07-27 18:36:14 +02:00
Adrià Tarroja Caubet d590139f93 Update TinyMCE to version 7
Closes #8683
2024-05-07 00:29:45 +02:00
Cédric Krier 196cfbeb0c Do the marketing record activity in the queue
This avoid to block the cron for a long period if there is a lot of record
activities to process.
In case of failure the record activities will be retried. And in case of long
delay in the queue, the record activities will not be processed twice thanks
to the transition filter of the workflow and the lock when updating state
field.

Closes #13146
2024-03-30 12:03:30 +01:00
Cédric Krier 3bfc1e25d0 Limit template error to Genshi error in marketing activity and email validation 2024-04-05 00:35:19 +02:00
Cédric Krier 6d9f1c8d56 Raise user error on template error when render marketing activity or email
Closes #13163
2024-04-05 00:34:19 +02:00
Cédric Krier cd3395b233 Add email constructor from message 2024-02-21 21:43:50 +01:00
Cédric Krier c5d85c1a4f Order email multipart/alternative by increasing preferences
The html version is preferred over the plain text.

Closes #13049
2024-02-21 19:51:08 +01:00
Cédric Krier 3cc0bb6c15 Add send_message methods to sendmail
Closes #13048
2024-02-21 21:38:53 +01:00
Cédric Krier 25b8316733 Use EmailMessage to construct emails
Closes #12958
2024-01-25 16:04:05 +01:00
Cédric Krier b919e5c828 Add trend spark lines to marketing automation scenario and activity 2023-11-07 00:21:00 +01:00
Cédric Krier e8306b14de Require a date time for record activity of marketing automation 2023-10-17 13:07:44 +02:00
Cédric Krier f671cb8532 Display block rate instead of absolute value
The rate provides a better picture of the unsubscription of the marketing
scenario.
2023-10-17 18:42:41 +02:00
Cédric Krier 42b5ba1377 Display email rates instead of absolute value
The rates provide a better picture of the efficiency of the marketing
scenario.
2023-10-16 16:25:48 +02:00
Cédric Krier ec6ce50423 Always return an integer when counting records for marketing scenario and activities 2023-10-18 17:30:43 +02:00
Cédric Krier fa8f47e0d1 Add short method to email marketing template context
This allows dynamic URL to be shorten and tracked.

Closes #12785
2023-11-30 10:07:57 +01:00
Cédric Krier 7976c25985 Add parent_action as depends on event and on activity fields
It is needed otherwise non editable view displaying those fields will set the
value to None thanks to the domain inversion.

Closes #12646
2023-10-16 16:17:05 +02:00
Cédric Krier 13cedb53e8 Convert email address to ASCII to support RFC6530
Python email library does not support non-ASCII emails so we convert email
addresses to ASCII version before passing them to sendmail.

Closes #10650
2023-04-29 19:04:18 +02:00
Cédric Krier 9e94c10a87 Test if anchor has href attribute before converting it
It is valid HTML to have anchor without href attribute.

Closes #12134
2023-03-10 12:53:00 +01:00
Cédric Krier 182718a420 Archive emails sent by marketing automation 2023-02-09 18:50:31 +01:00
Cédric Krier ca308e27fc Prepare migration to monorepo 2022-12-16 18:12:26 +01:00