From 359e8f359ce6477d218be6dab20d51d62cc795d6 Mon Sep 17 00:00:00 2001 From: Saran440 Date: Thu, 3 Sep 2020 11:39:23 +0700 Subject: [PATCH] [13.0][MIG] report_async --- oca_dependencies.txt | 1 + report_async/README.rst | 11 ++++++----- report_async/__manifest__.py | 2 +- report_async/models/ir_report.py | 3 +-- report_async/models/report_async.py | 6 ------ report_async/readme/CONTRIBUTORS.rst | 1 + report_async/static/description/index.html | 7 ++++--- report_async/views/report_async.xml | 2 -- report_async/wizard/print_report_wizard.py | 1 - report_async/wizard/print_report_wizard.xml | 1 - 10 files changed, 14 insertions(+), 21 deletions(-) diff --git a/oca_dependencies.txt b/oca_dependencies.txt index 13546285c..49ccd9736 100644 --- a/oca_dependencies.txt +++ b/oca_dependencies.txt @@ -1,2 +1,3 @@ server-tools server-backend +queue diff --git a/report_async/README.rst b/report_async/README.rst index 43ce15a6b..075627f87 100644 --- a/report_async/README.rst +++ b/report_async/README.rst @@ -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 `_. 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -92,6 +92,7 @@ Contributors ~~~~~~~~~~~~ * Kitti U. +* Saran Lim. Maintainers ~~~~~~~~~~~ @@ -114,6 +115,6 @@ Current `maintainer `__: |maintainer-kittiu| -This module is part of the `OCA/reporting-engine `_ project on GitHub. +This module is part of the `OCA/reporting-engine `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/report_async/__manifest__.py b/report_async/__manifest__.py index de7444581..8fafc099e 100644 --- a/report_async/__manifest__.py +++ b/report_async/__manifest__.py @@ -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", diff --git a/report_async/models/ir_report.py b/report_async/models/ir_report.py index 2c4eb569a..03a122cda 100644 --- a/report_async/models/ir_report.py +++ b/report_async/models/ir_report.py @@ -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): diff --git a/report_async/models/report_async.py b/report_async/models/report_async.py index 7ece44eb4..63480cf9f 100644 --- a/report_async/models/report_async.py +++ b/report_async/models/report_async.py @@ -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, diff --git a/report_async/readme/CONTRIBUTORS.rst b/report_async/readme/CONTRIBUTORS.rst index 6ce956d96..b8832b9e7 100644 --- a/report_async/readme/CONTRIBUTORS.rst +++ b/report_async/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Kitti U. +* Saran Lim. diff --git a/report_async/static/description/index.html b/report_async/static/description/index.html index 2a72761e6..f31d1515c 100644 --- a/report_async/static/description/index.html +++ b/report_async/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/reporting-engine Translate me on Weblate Try me on Runbot

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,

    @@ -424,7 +424,7 @@ report will be sent.

    Bugs are tracked on GitHub 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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -439,6 +439,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    Contributors

    @@ -450,7 +451,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

    Current maintainer:

    kittiu

    -

    This module is part of the OCA/reporting-engine project on GitHub.

    +

    This module is part of the OCA/reporting-engine project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/report_async/views/report_async.xml b/report_async/views/report_async.xml index 15aa2e9c7..5b833029f 100644 --- a/report_async/views/report_async.xml +++ b/report_async/views/report_async.xml @@ -150,7 +150,6 @@ Report Center ir.actions.act_window report.async - form Run reports asyncronously Report Files ir.actions.act_window ir.attachment - form kanban,tree,form diff --git a/report_async/wizard/print_report_wizard.py b/report_async/wizard/print_report_wizard.py index ebaa7ce0c..2f3fe1add 100644 --- a/report_async/wizard/print_report_wizard.py +++ b/report_async/wizard/print_report_wizard.py @@ -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) diff --git a/report_async/wizard/print_report_wizard.xml b/report_async/wizard/print_report_wizard.xml index 723897609..1410e51da 100644 --- a/report_async/wizard/print_report_wizard.xml +++ b/report_async/wizard/print_report_wizard.xml @@ -31,7 +31,6 @@ Print Document print.report.wizard - form form new