diff --git a/direct_print_odoo/README.rst b/direct_print_odoo/README.rst index c8100ae85..1d7f6b860 100644 --- a/direct_print_odoo/README.rst +++ b/direct_print_odoo/README.rst @@ -1,5 +1,5 @@ .. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg - :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 Direct Print @@ -26,7 +26,7 @@ Company License ------- General Public License, Version 3 (LGPL v3). -(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) Credits ------- diff --git a/direct_print_odoo/__manifest__.py b/direct_print_odoo/__manifest__.py index f01b9c4fb..14f63252e 100644 --- a/direct_print_odoo/__manifest__.py +++ b/direct_print_odoo/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': 'Direct Print', - 'version': '16.0.1.0.0', + 'version': '16.0.1.1.1', 'summary': 'The Direct Print is a tool that connects Odoo to PrintNode, ' 'a cloud-based printing service. This connector allows users to' ' send print jobs from their Odoo environment to any printer ' diff --git a/direct_print_odoo/controllers/printer.py b/direct_print_odoo/controllers/printer.py index 1f0012e47..fdb8b6b83 100644 --- a/direct_print_odoo/controllers/printer.py +++ b/direct_print_odoo/controllers/printer.py @@ -70,8 +70,8 @@ class ReportControllers(ReportController): pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0] - print_node_url = request.env[ - 'ir.config_parameter'].sudo().get_param('url_print_node') + # print_node_url = request.env[ + # 'ir.config_parameter'].sudo().get_param('url_print_node') print_node_api = request.env[ 'ir.config_parameter'].sudo().get_param('api_key_print_node') default_printer = request.env[ @@ -91,7 +91,7 @@ class ReportControllers(ReportController): int(printer)) multi_printer_details.append(printer_details.id_of_printer) if multiple_printers_boolean: - gateway = Gateway(url=print_node_url, apikey=print_node_api) + gateway = Gateway(url='https://api.printnode.com/', apikey=print_node_api) data_record = base64.b64encode(pdf) ir_values = { 'name': "Customer Report", @@ -122,7 +122,7 @@ class ReportControllers(ReportController): raise ValidationError(_( 'please select at least one printer')) else: - gateway = Gateway(url=print_node_url, apikey=print_node_api) + gateway = Gateway(url='https://api.printnode.com/', apikey=print_node_api) data_record = base64.b64encode(pdf) ir_values = { 'name': "Customer Report", diff --git a/direct_print_odoo/doc/RELEASE_NOTES.md b/direct_print_odoo/doc/RELEASE_NOTES.md index 06460d4c4..db049add7 100644 --- a/direct_print_odoo/doc/RELEASE_NOTES.md +++ b/direct_print_odoo/doc/RELEASE_NOTES.md @@ -4,3 +4,8 @@ #### Version 16.0.1.0.0 #### ADD - Initial commit for Direct Print + +#### 06.10.2023 +#### Version 16.0.1.1.1 +#### UPDATE +- Update commit for Direct Print \ No newline at end of file diff --git a/direct_print_odoo/models/res_config_settings.py b/direct_print_odoo/models/res_config_settings.py index d5f7cd580..b224aa6fc 100644 --- a/direct_print_odoo/models/res_config_settings.py +++ b/direct_print_odoo/models/res_config_settings.py @@ -19,7 +19,6 @@ # If not, see . # ############################################################################# -import json from ast import literal_eval from printnodeapi.gateway import Gateway from odoo import api, fields, models ,_ @@ -38,7 +37,6 @@ class ResConfigSettings(models.TransientModel): checking the available printers in the system""" _inherit = 'res.config.settings' - url_print_node = fields.Char(string='Url', help='URL of the printnode') api_key_print_node = fields.Char(string="API Key", help='API Key of the printnode') available_printers_id = fields.Many2one('printer.details', @@ -52,15 +50,12 @@ class ResConfigSettings(models.TransientModel): 'Printers', config_parameter='direct_print_odoo' '.multiple_printers') - @api.model def get_values(self): """Get the values in the config""" res = super(ResConfigSettings, self).get_values() res['api_key_print_node'] = self.env[ 'ir.config_parameter'].sudo().get_param('api_key_print_node') - res['url_print_node'] = self.env[ - 'ir.config_parameter'].sudo().get_param('url_print_node') res['printers_ids'] = self.env[ 'ir.config_parameter'].sudo().get_param( 'direct_print_odoo.printers_ids') @@ -82,8 +77,6 @@ class ResConfigSettings(models.TransientModel): """Set the values in the config""" self.env['ir.config_parameter'].sudo().set_param('api_key_print_node', self.api_key_print_node) - self.env['ir.config_parameter'].sudo().set_param('url_print_node', - self.url_print_node) self.env['ir.config_parameter'].sudo().set_param( 'direct_print_odoo.printers_ids', self.printers_ids.ids) @@ -91,12 +84,10 @@ class ResConfigSettings(models.TransientModel): def action_check_printers(self): """Check the available printer""" - print_node_url = self.env['ir.config_parameter'].sudo().get_param( - 'url_print_node') print_node_api = self.env['ir.config_parameter'].sudo().get_param( 'api_key_print_node') try: - gateway = Gateway(url=print_node_url, apikey=print_node_api) + gateway = Gateway(url="https://api.printnode.com", apikey=print_node_api) computer_id = int(gateway.computers()[0].id) if computer_id: for printer in gateway.printers(computer=computer_id): @@ -113,5 +104,5 @@ class ResConfigSettings(models.TransientModel): raise ValidationError(_('Printer already exists')) else: raise ValidationError(_('Please Connect a Computer First ')) - except Exception as e: + except Exception: raise ValidationError(_("Please provide valid credentials")) diff --git a/direct_print_odoo/static/description/assets/screenshots.zip b/direct_print_odoo/static/description/assets/screenshots.zip deleted file mode 100644 index bf4dd77b3..000000000 Binary files a/direct_print_odoo/static/description/assets/screenshots.zip and /dev/null differ diff --git a/direct_print_odoo/static/description/assets/screenshots/odoo_config.png b/direct_print_odoo/static/description/assets/screenshots/odoo_config.png index 52b5f522b..99503ffb2 100644 Binary files a/direct_print_odoo/static/description/assets/screenshots/odoo_config.png and b/direct_print_odoo/static/description/assets/screenshots/odoo_config.png differ diff --git a/direct_print_odoo/static/description/assets/screenshots/printer.gif b/direct_print_odoo/static/description/assets/screenshots/printer.gif index 777bcee92..f0a462464 100644 Binary files a/direct_print_odoo/static/description/assets/screenshots/printer.gif and b/direct_print_odoo/static/description/assets/screenshots/printer.gif differ diff --git a/direct_print_odoo/static/description/index.html b/direct_print_odoo/static/description/index.html index 8cb202522..b36130046 100644 --- a/direct_print_odoo/static/description/index.html +++ b/direct_print_odoo/static/description/index.html @@ -30,7 +30,7 @@

Direct Print

- Direct Print

+ The Direct Print is a Tool That Connects Odoo to PrintNode

@@ -428,7 +428,7 @@ - + @@ -565,7 +565,7 @@ - +
- + - res.config.settings.view.form.inherit.direct.print.odoo + + res.config.settings.view.form.inherit.direct.print.odoo + res.config.settings - + - -

Direct Print Odoo

-
-