mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX] support for attachment to record
This commit is contained in:
@@ -46,6 +46,9 @@ odoo.define("report_async.ActionMenus", function (require) {
|
||||
const is_report_async = this.$(
|
||||
"#async_report_checker"
|
||||
).prop("checked");
|
||||
const save_report_attachment = this.$(
|
||||
"#async-save-report-checker"
|
||||
).prop("checked");
|
||||
const user_email = this.$("#async-user-email").val();
|
||||
if (user_email !== "" && is_report_async) {
|
||||
// Try basic email validation
|
||||
@@ -64,6 +67,7 @@ odoo.define("report_async.ActionMenus", function (require) {
|
||||
to_email: user_email,
|
||||
data: action.data || {},
|
||||
context: action.context || {},
|
||||
save_attachment_to_records: save_report_attachment
|
||||
},
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
@@ -20,6 +20,26 @@
|
||||
via queue job and sent to a below email address.
|
||||
</small>
|
||||
</div>
|
||||
<!-- Allow saving of attachment to record -->
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input
|
||||
type="checkbox"
|
||||
class="form-check-input"
|
||||
checked="checked"
|
||||
id="async-save-report-checker"
|
||||
/>
|
||||
<label class="form-check-label"
|
||||
for="async-save-report-checker">
|
||||
Save attachment to records
|
||||
</label>
|
||||
</div>
|
||||
<small id="async-save-report-checker-help"
|
||||
class="form-text text-muted">
|
||||
Checker enables async report attachment to be created and
|
||||
saved to the records. NB: Records should support attachments
|
||||
</small>
|
||||
</div>
|
||||
<!-- Email Input -->
|
||||
<div class="form-group">
|
||||
<label for="async-user-email">Email Address</label>
|
||||
|
||||
Reference in New Issue
Block a user