[13.0][MIG] report_async

This commit is contained in:
Saran440
2020-09-03 11:39:23 +07:00
committed by Kitti U
parent d4afffff27
commit 359e8f359c
10 changed files with 14 additions and 21 deletions

View File

@@ -1,2 +1,3 @@
server-tools
server-backend
queue

View File

@@ -14,13 +14,13 @@ Report Async
: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/12.0/report_async
:target: https://github.com/OCA/reporting-engine/tree/13.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-12-0/reporting-engine-12-0-report_async
:target: https://translation.odoo-community.org/projects/reporting-engine-13-0/reporting-engine-13-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/12.0
:target: https://runbot.odoo-community.org/runbot/143/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -76,7 +76,7 @@ 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:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_async%0Aversion:%2013.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.
@@ -92,6 +92,7 @@ Contributors
~~~~~~~~~~~~
* Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th>
Maintainers
~~~~~~~~~~~
@@ -114,6 +115,6 @@ 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/12.0/report_async>`_ project on GitHub.
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/13.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,7 +3,7 @@
{
"name": "Report Async",
"summary": "Central place to run reports live or async",
"version": "12.0.1.0.1",
"version": "13.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/reporting-engine",

View File

@@ -1,7 +1,7 @@
# Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import api, models
from odoo import models
# Define all supported report_type
REPORT_TYPES = ["qweb-pdf", "qweb-text", "qweb-xml", "csv", "excel", "xlsx"]
@@ -10,7 +10,6 @@ REPORT_TYPES = ["qweb-pdf", "qweb-text", "qweb-xml", "csv", "excel", "xlsx"]
class Report(models.Model):
_inherit = "ir.actions.report"
@api.noguess
def report_action(self, docids, data=None, config=True):
res = super(Report, self).report_action(docids, data=data, config=config)
if res["context"].get("async_process", False):

View File

@@ -67,7 +67,6 @@ class ReportAsync(models.Model):
help="List all files created by this report background process",
)
@api.multi
def _compute_job(self):
for rec in self:
rec.job_ids = (
@@ -84,7 +83,6 @@ class ReportAsync(models.Model):
rec.job_status = rec.job_ids[0].sudo().state if rec.job_ids else False
rec.job_info = rec.job_ids[0].sudo().exc_info if rec.job_ids else False
@api.multi
def _compute_file(self):
files = self.env["ir.attachment"].search(
[
@@ -106,7 +104,6 @@ class ReportAsync(models.Model):
result["context"] = ctx
return result
@api.multi
def run_async(self):
self.ensure_one()
if not self.allow_async:
@@ -118,7 +115,6 @@ class ReportAsync(models.Model):
result["context"] = ctx
return result
@api.multi
def view_files(self):
self.ensure_one()
action = self.env.ref("report_async.action_view_files")
@@ -126,7 +122,6 @@ class ReportAsync(models.Model):
result["domain"] = [("id", "in", self.file_ids.ids)]
return result
@api.multi
def view_jobs(self):
self.ensure_one()
action = self.env.ref("queue_job.action_queue_job")
@@ -152,7 +147,6 @@ class ReportAsync(models.Model):
{
"name": out_name,
"datas": out_file,
"datas_fname": out_name,
"type": "binary",
"res_model": "report.async",
"res_id": self.id,

View File

@@ -1 +1,2 @@
* Kitti U. <kittiu@ecosoft.co.th>
* Saran Lim. <saranl@ecosoft.co.th>

View File

@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_async"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-12-0/reporting-engine-12-0-report_async"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/13.0/report_async"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-13-0/reporting-engine-13-0-report_async"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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,</p>
<ol class="arabic simple">
@@ -424,7 +424,7 @@ report will be sent.</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_async%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_async%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -439,6 +439,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
<ul class="simple">
<li>Kitti U. &lt;<a class="reference external" href="mailto:kittiu&#64;ecosoft.co.th">kittiu&#64;ecosoft.co.th</a>&gt;</li>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
@@ -450,7 +451,7 @@ mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/kittiu"><img alt="kittiu" src="https://github.com/kittiu.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/12.0/report_async">OCA/reporting-engine</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/13.0/report_async">OCA/reporting-engine</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -150,7 +150,6 @@
<field name="name">Report Center</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">report.async</field>
<field name="view_type">form</field>
<field name="help">Run reports asyncronously</field>
</record>
<menuitem
@@ -163,7 +162,6 @@
<field name="name">Report Files</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ir.attachment</field>
<field name="view_type">form</field>
<field name="view_id" eval="False" />
<field name="search_view_id" ref="base.view_attachment_search" />
<field name="view_mode">kanban,tree,form</field>

View File

@@ -36,7 +36,6 @@ class PrintReportWizard(models.TransientModel):
domain = [("model", "=", self.reference._name)]
return {"domain": {"action_report_id": domain}}
@api.multi
def print_report(self):
self.ensure_one()
return self.action_report_id.report_action(self.reference, config=False)

View File

@@ -31,7 +31,6 @@
<record id="action_print_report_wizard" model="ir.actions.act_window">
<field name="name">Print Document</field>
<field name="res_model">print.report.wizard</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>