From d9242e3a6ba4dda4e2d4785d5533a55c1ec35f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 17 Sep 2020 17:18:02 +0200 Subject: [PATCH] Send client email via server issue9449 review292001002 --- CHANGELOG | 1 + images/tryton-send.svg | 1 + src/action.js | 7 -- src/common.js | 147 ++++++++++++++++++++++++- src/sao.js | 8 +- src/sao.less | 12 ++ src/tab.js | 41 ++++++- src/theme.less | 3 + src/view/form.js | 151 ++----------------------- src/window.js | 242 +++++++++++++++++++++++++++++++++++++++++ 10 files changed, 454 insertions(+), 159 deletions(-) create mode 100644 images/tryton-send.svg diff --git a/CHANGELOG b/CHANGELOG index fb079ef57c..c6925733b5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Support e-mail template * Always encode CSV export in UTF-8 * Use tempusdominus and Popper for date time picker * Support PYSON comparison of date and datetime diff --git a/images/tryton-send.svg b/images/tryton-send.svg new file mode 100644 index 0000000000..033ab7a11a --- /dev/null +++ b/images/tryton-send.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/action.js b/src/action.js index 143b853b02..407b201903 100644 --- a/src/action.js +++ b/src/action.js @@ -132,8 +132,6 @@ params.name = action.report_name; params.data = data; params.direct_print = action.direct_print; - params.email_print = action.email_print; - params.email = action.email; params.context = context; Sao.Action.exec_report(params); return; @@ -183,15 +181,10 @@ if (!attributes.context) { attributes.context = {}; } - if (!attributes.email) { - attributes.email = {}; - } var data = jQuery.extend({}, attributes.data); var context = jQuery.extend({}, Sao.Session.current_session.context); jQuery.extend(context, attributes.context); context.direct_print = attributes.direct_print; - context.email_print = attributes.email_print; - context.email = attributes.email; var prm = Sao.rpc({ 'method': 'report.' + attributes.name + '.execute', diff --git a/src/common.js b/src/common.js index 430107554d..0459011e1c 100644 --- a/src/common.js +++ b/src/common.js @@ -133,7 +133,7 @@ keys.forEach(function(k, i) { jQuery('
', { - 'class': 'checkbox' + 'class': 'radio' }).append(jQuery('