From 7850547d14c18dc86be1b831dd93a543151657b5 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Mon, 3 Jun 2019 11:59:01 +0200 Subject: [PATCH] [12.0][MIG] remote_report_to_printer --- oca_dependencies.txt | 1 + remote_report_to_printer/README.rst | 72 ++++++++++++------- remote_report_to_printer/__manifest__.py | 5 +- .../data/printing_data.xml | 4 ++ .../models/res_remote_printer.py | 1 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 12 ++++ remote_report_to_printer/readme/USAGE.rst | 1 + .../tests/test_printer.py | 4 +- 9 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 oca_dependencies.txt create mode 100644 remote_report_to_printer/readme/CONTRIBUTORS.rst create mode 100644 remote_report_to_printer/readme/DESCRIPTION.rst create mode 100644 remote_report_to_printer/readme/USAGE.rst diff --git a/oca_dependencies.txt b/oca_dependencies.txt new file mode 100644 index 0000000..9c8c917 --- /dev/null +++ b/oca_dependencies.txt @@ -0,0 +1 @@ +server-tools diff --git a/remote_report_to_printer/README.rst b/remote_report_to_printer/README.rst index 4261fcc..1bd946e 100644 --- a/remote_report_to_printer/README.rst +++ b/remote_report_to_printer/README.rst @@ -1,10 +1,29 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 +============================ +Report to printer on remotes +============================ -================= -Report To Printer -================= +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Freport--print--send-lightgray.png?logo=github + :target: https://github.com/OCA/report-print-send/tree/12.0/remote_report_to_printer + :alt: OCA/report-print-send +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/report-print-send-12-0/report-print-send-12-0-remote_report_to_printer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/144/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows users to send reports to a printer using remote's configuration. @@ -19,49 +38,52 @@ It adds an optional behaviour on reports to send it directly to a printer. Also, this option can be selected as a user default option for printer. +**Table of contents** + +.. contents:: + :local: + Usage ===== * In *Settings > Remotes* configure the remotes printers by usage - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/144/11.0 - - 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. +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 `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Creu Blanca Contributors ------------- +~~~~~~~~~~~~ * Enric Tobella -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/report-print-send `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/remote_report_to_printer/__manifest__.py b/remote_report_to_printer/__manifest__.py index 199b330..39a8836 100644 --- a/remote_report_to_printer/__manifest__.py +++ b/remote_report_to_printer/__manifest__.py @@ -3,10 +3,10 @@ { 'name': "Report to printer on remotes", - 'version': '11.0.2.1.1', + 'version': '12.0.2.1.1', 'category': 'Generic Modules/Base', 'author': "Creu Blanca, Odoo Community Association (OCA)", - 'website': 'http://www.agilebg.com', + 'website': 'http://www.github.com/OCA/report-print-send', 'license': 'AGPL-3', "depends": ['base_remote', 'base_report_to_printer'], 'data': [ @@ -16,5 +16,4 @@ 'views/res_remote_printer_views.xml', ], 'installable': True, - 'application': True, } diff --git a/remote_report_to_printer/data/printing_data.xml b/remote_report_to_printer/data/printing_data.xml index b6c54b5..9bf8c12 100644 --- a/remote_report_to_printer/data/printing_data.xml +++ b/remote_report_to_printer/data/printing_data.xml @@ -6,4 +6,8 @@ remote_default + + Use User Defaults + user_default + diff --git a/remote_report_to_printer/models/res_remote_printer.py b/remote_report_to_printer/models/res_remote_printer.py index 50faaaf..5f86d7b 100644 --- a/remote_report_to_printer/models/res_remote_printer.py +++ b/remote_report_to_printer/models/res_remote_printer.py @@ -6,6 +6,7 @@ from odoo.exceptions import ValidationError class ResRemotePrinter(models.Model): _name = 'res.remote.printer' + _description = 'Remote Printer' remote_id = fields.Many2one( 'res.remote', diff --git a/remote_report_to_printer/readme/CONTRIBUTORS.rst b/remote_report_to_printer/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..93ec993 --- /dev/null +++ b/remote_report_to_printer/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Enric Tobella diff --git a/remote_report_to_printer/readme/DESCRIPTION.rst b/remote_report_to_printer/readme/DESCRIPTION.rst new file mode 100644 index 0000000..3aa0c75 --- /dev/null +++ b/remote_report_to_printer/readme/DESCRIPTION.rst @@ -0,0 +1,12 @@ +This module allows users to send reports to a printer using remote's configuration. + +A *remote* is an external entity that access odoo. For example, computers, mobiles, +servers... We will identify *remotes* by its name or ip. On some environments, +we want to configure the printers by remote, because users may change their +work place. + +It adds an optional behaviour on reports to send it directly to a printer. + +* `Use remote's configuration` use the remote's behaviour + +Also, this option can be selected as a user default option for printer. diff --git a/remote_report_to_printer/readme/USAGE.rst b/remote_report_to_printer/readme/USAGE.rst new file mode 100644 index 0000000..b923702 --- /dev/null +++ b/remote_report_to_printer/readme/USAGE.rst @@ -0,0 +1 @@ + * In *Settings > Remotes* configure the remotes printers by usage diff --git a/remote_report_to_printer/tests/test_printer.py b/remote_report_to_printer/tests/test_printer.py index cfee617..27677b2 100644 --- a/remote_report_to_printer/tests/test_printer.py +++ b/remote_report_to_printer/tests/test_printer.py @@ -66,7 +66,7 @@ class TestRemotePrinter(TransactionCase): report = self.Model.search([], limit=1) self.env.user.printing_action = 'remote_default' report.property_printing_action_id = self.browse_ref( - 'base_report_to_printer.printing_action_3' + 'remote_report_to_printer.printing_action_3' ) with patch( 'odoo.addons.base_remote.models.base.Base.remote', new=self.remote @@ -96,7 +96,7 @@ class TestRemotePrinter(TransactionCase): report = self.Model.search([], limit=1) self.env.user.printing_action = 'remote_default' report.property_printing_action_id = self.browse_ref( - 'base_report_to_printer.printing_action_3' + 'remote_report_to_printer.printing_action_3' ) with patch( 'odoo.addons.base_remote.models.base.Base.remote',