[FIX] readme sample

This commit is contained in:
KKamaa
2022-04-15 14:05:47 +03:00
parent 6c5cf35974
commit 65e4a41a89
7 changed files with 167 additions and 5 deletions

View File

@@ -0,0 +1,137 @@
============
Report Async
============
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
:target: https://github.com/OCA/reporting-engine/tree/14.0/report_async
:alt: OCA/reporting-engine
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_async
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/143/14.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
The new menu "Report Center" is the central place to host your reports in one place.
From here, there are 2 ways to launch the report,
1. Run Now - run report immediately as per normal.
2. Run Background - put the report execution to queue job.
By using the queue job, option 2 is great for long running report.
The report file will be saved for later use, with the option to send report
by email as soon as it is ready.
Notes:
* Only user with Technical Feature rights can manage the report.
* Every internal user will have right to execute the report allowed for his/her groups.
* The files created are owned and viewable only by the person who run the report.
* Job queue manager can also see all jobs for each reports.
**Table of contents**
.. contents::
:local:
Usage
=====
Menu: Dashboard > Report Center
As Technical Feature users, you can manage reports for Report Center.
- **Report:** choose the report (a window action). Although the option show all window actions
it only make sense for window actions that launch reports.
- **Allow Async:** check this, if you want the report to run in background too, suitable for
report that return file as result, i.e., pdf/xlsx/csv/txt.
- **Email Notification:** if checked, once the background process is completed, email with link to download
report will be sent.
- **Groups:** select user groups allowed to use this report. If left blank, all user can use.
As normal user, you can run your reports from Report Center
- **Run Now button:** to run report immediately as per normal.
- **Run Background button:** to run report asynchronously. Fall back to run now, if not report that produce file.
- **Job Status:** show status of the latest run job. If job fail, exception error will also shown
- **Files:** show all files being produced by the job as run by the user.
- **Jobs:** show all jobs triggered by this report as run by the user. Only job queue manager have access to this button.
As additional improvement, you can now generate reports async directly from the form view itself,
and not have to go into the "Report Center" specifically to do it. This can be done by pressing
*Print*, you will get a popup asking you if you want to run it Async, and then to verify the email
address that it should be sent to. See below sample:
.. image:: https://raw.githubusercontent.com/OCA/reporting-engine/14.0/report_async/static/description/sample.gif
:width: 800
:alt: How It Works
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_async%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Authors
~~~~~~~
* Ecosoft
Contributors
~~~~~~~~~~~~
* `Ecosoft <http://ecosoft.co.th>`__:
* Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th>
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
* `Sunflower IT <https://sunflowerweb.nl>`__:
* Tom Blauwendraat <tom@sunflowerweb.nl>
* Kevin Kamau <kevin@sunflowerweb.nl>
Maintainers
~~~~~~~~~~~
This module is maintained by the OCA.
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-kittiu|
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/14.0/report_async>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -3,3 +3,8 @@
* Kitti U. <kittiu@ecosoft.co.th> * Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th> * Saran Lim. <saranl@ecosoft.co.th>
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th> * Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
* `Sunflower IT <https://sunflowerweb.nl>`__:
* Tom Blauwendraat <tom@sunflowerweb.nl>
* Kevin Kamau <kevin@sunflowerweb.nl>

View File

@@ -17,3 +17,12 @@ As normal user, you can run your reports from Report Center
- **Job Status:** show status of the latest run job. If job fail, exception error will also shown - **Job Status:** show status of the latest run job. If job fail, exception error will also shown
- **Files:** show all files being produced by the job as run by the user. - **Files:** show all files being produced by the job as run by the user.
- **Jobs:** show all jobs triggered by this report as run by the user. Only job queue manager have access to this button. - **Jobs:** show all jobs triggered by this report as run by the user. Only job queue manager have access to this button.
As additional improvement, you can now generate reports async directly from the form view itself,
and not have to go into the "Report Center" specifically to do it. This can be done by pressing
*Print*, you will get a popup asking you if you want to run it Async, and then to verify the email
address that it should be sent to. See below sample:
.. image:: ../static/description/sample.gif
:width: 800
:alt: How It Works

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" /> <meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Report Async</title> <title>Report Async</title>
<style type="text/css"> <style type="text/css">
@@ -418,6 +418,11 @@ report will be sent.</li>
<li><strong>Files:</strong> show all files being produced by the job as run by the user.</li> <li><strong>Files:</strong> show all files being produced by the job as run by the user.</li>
<li><strong>Jobs:</strong> show all jobs triggered by this report as run by the user. Only job queue manager have access to this button.</li> <li><strong>Jobs:</strong> show all jobs triggered by this report as run by the user. Only job queue manager have access to this button.</li>
</ul> </ul>
<p>As additional improvement, you can now generate reports async directly from the form view itself,
and not have to go into the “Report Center” specifically to do it. This can be done by pressing
<em>Print</em>, you will get a popup asking you if you want to run it Async, and then to verify the email
address that it should be sent to. See below sample:</p><br/>
<img alt="How It Works" src="sample.gif" style="width: 800px;" /></br>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1> <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
@@ -444,6 +449,11 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Tharathip Chaweewongphan &lt;<a class="reference external" href="mailto:tharathipc&#64;ecosoft.co.th">tharathipc&#64;ecosoft.co.th</a>&gt;</li> <li>Tharathip Chaweewongphan &lt;<a class="reference external" href="mailto:tharathipc&#64;ecosoft.co.th">tharathipc&#64;ecosoft.co.th</a>&gt;</li>
</ul> </ul>
</li> </li>
<li><a class="reference external" href="https://sunflowerweb.nl">Sunflower IT</a>:<ul>
<li>Tom Blauwendraat &lt;<a class="reference external" href="mailto:tom&#64;sunflowerweb.nl">tom&#64;sunflowerweb.nl</a>&gt;</li>
<li>Kevin Kamau &lt;<a class="reference external" href="mailto:kevin&#64;sunflowerweb.nl">kevin&#64;sunflowerweb.nl</a>&gt;</li>
</ul>
</li>
</ul> </ul>
</div> </div>
<div class="section" id="maintainers"> <div class="section" id="maintainers">

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

View File

@@ -12,7 +12,7 @@ odoo.define("report_async.ActionMenus", function (require) {
function validate_email(email) { function validate_email(email) {
const res = email.match( const res = email.match(
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
); );
if (!res) { if (!res) {
return false; return false;
@@ -25,7 +25,7 @@ odoo.define("report_async.ActionMenus", function (require) {
async _executeAction(action) { async _executeAction(action) {
const self = this; const self = this;
const _super = this._super; const _super = this._super;
const args = arguments; // Dict action const args = arguments;
const records = this.props.activeIds; const records = this.props.activeIds;
var $content = $(QWeb.render("ReportAsyncConfiguration", {})); var $content = $(QWeb.render("ReportAsyncConfiguration", {}));

View File

@@ -85,8 +85,9 @@ odoo.define("report_qweb_encrypt.Dialog", function (require) {
}) })
); );
reportUrls = _.mapObject(reportUrls, function (value) { reportUrls = _.mapObject(reportUrls, function (value) {
value += serializedOptionsPath; var val = value;
return value; val += serializedOptionsPath;
return val;
}); });
} }
} }