diff --git a/report_wkhtmltopdf_param/README.rst b/report_wkhtmltopdf_param/README.rst index 8dc8010ffa..10a19053f3 100644 --- a/report_wkhtmltopdf_param/README.rst +++ b/report_wkhtmltopdf_param/README.rst @@ -17,13 +17,13 @@ Report Wkhtmltopdf Param :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/17.0/report_wkhtmltopdf_param + :target: https://github.com/OCA/reporting-engine/tree/18.0/report_wkhtmltopdf_param :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-17-0/reporting-engine-17-0-report_wkhtmltopdf_param + :target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_wkhtmltopdf_param :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -59,7 +59,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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -75,13 +75,14 @@ Authors Contributors ------------ -- Miku Laitinen -- Jordi Ballester -- Saran Lim. -- Foram Shah -- `Trobz `__: +- Miku Laitinen +- Jordi Ballester +- Saran Lim. +- Foram Shah +- `Trobz `__: - - Tris Doan + - Tris Doan + - Nhan Tran Other credits ------------- @@ -102,6 +103,6 @@ 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. -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_wkhtmltopdf_param/__manifest__.py b/report_wkhtmltopdf_param/__manifest__.py index b0dada3f2b..093e61dfeb 100644 --- a/report_wkhtmltopdf_param/__manifest__.py +++ b/report_wkhtmltopdf_param/__manifest__.py @@ -4,7 +4,7 @@ # noinspection PyStatementEffect { "name": "Report Wkhtmltopdf Param", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "license": "AGPL-3", "summary": """ Add new parameters for a paper format to be used by wkhtmltopdf diff --git a/report_wkhtmltopdf_param/models/report_paperformat.py b/report_wkhtmltopdf_param/models/report_paperformat.py index 774e9ddb14..ed5e427b23 100644 --- a/report_wkhtmltopdf_param/models/report_paperformat.py +++ b/report_wkhtmltopdf_param/models/report_paperformat.py @@ -4,7 +4,7 @@ import logging -from odoo import _, api, fields, models +from odoo import api, fields, models from odoo.exceptions import ValidationError _logger = logging.getLogger(__name__) @@ -21,7 +21,7 @@ class Paper(models.Model): ) @api.constrains("custom_params") - def _check_recursion(self): + def _check_recursion_custom_params(self): for paperformat in self: sample_html = """ @@ -39,5 +39,5 @@ def _check_recursion(self): content = report._run_wkhtmltopdf(sample_html) if not content: raise ValidationError( - _("Failed to create a PDF using the provided parameters.") + self.env._("Failed to create a PDF using the provided parameters.") ) diff --git a/report_wkhtmltopdf_param/readme/CONTRIBUTORS.md b/report_wkhtmltopdf_param/readme/CONTRIBUTORS.md index 39e05f143c..b299d03fd2 100644 --- a/report_wkhtmltopdf_param/readme/CONTRIBUTORS.md +++ b/report_wkhtmltopdf_param/readme/CONTRIBUTORS.md @@ -4,3 +4,4 @@ - Foram Shah \<\> - [Trobz](https://www.trobz.com): - Tris Doan \<\> + - Nhan Tran \<\> diff --git a/report_wkhtmltopdf_param/security/ir.model.access.csv b/report_wkhtmltopdf_param/security/ir.model.access.csv index 63fd8f7cb5..e93cc48e61 100644 --- a/report_wkhtmltopdf_param/security/ir.model.access.csv +++ b/report_wkhtmltopdf_param/security/ir.model.access.csv @@ -1,4 +1,4 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "paperformat_parameter_access_portal","ir_actions_report_paperformat_parameter group_portal","model_report_paperformat_parameter","base.group_portal",1,0,0,0 -"paperformat_parameter_access_employee","ir_actions_report_paperformat_parameter group_hr_user","model_report_paperformat_parameter",,1,0,1,0 +"paperformat_parameter_access_employee","ir_actions_report_paperformat_parameter group_hr_user","model_report_paperformat_parameter",base.group_user,1,0,1,0 "paperformat_parameter_access_administration","ir_actions_report_paperformat_parameter group_system","model_report_paperformat_parameter","base.group_system",1,1,1,1 diff --git a/report_wkhtmltopdf_param/static/description/index.html b/report_wkhtmltopdf_param/static/description/index.html index 5ffe9e5b32..b06073a6b5 100644 --- a/report_wkhtmltopdf_param/static/description/index.html +++ b/report_wkhtmltopdf_param/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,7 +369,7 @@

Report Wkhtmltopdf Param

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:59a736539b5a1aed58f6c0a874c94500c4974f286fbb5cb3d45eddcc2e2865f5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module allows you to add new parameters for a paper format which are then forwarded to wkhtmltopdf command as arguments. To display the arguments that wkhtmltopdf accepts go to your command line and type @@ -407,7 +408,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 to smash it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -428,6 +429,7 @@

Contributors

  • Foram Shah <foramshah@initos.com>
  • Trobz:
  • @@ -440,11 +442,13 @@

    Other credits

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    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.

    -

    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_wkhtmltopdf_param/tests/test_report_paperformat.py b/report_wkhtmltopdf_param/tests/test_report_paperformat.py index 1c749b1323..1a10f3be22 100644 --- a/report_wkhtmltopdf_param/tests/test_report_paperformat.py +++ b/report_wkhtmltopdf_param/tests/test_report_paperformat.py @@ -2,6 +2,8 @@ # Copyright 2017 Eficent Business and IT Consulting Services, S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +import logging + import odoo.tests from odoo.exceptions import ValidationError from odoo.tests.common import tagged @@ -11,7 +13,10 @@ class TestWkhtmltopdf(odoo.tests.TransactionCase): def test_wkhtmltopdf_incorrect_parameter(self): for report_paperformat in self.env["report.paperformat"].search([]): - with self.assertRaises(ValidationError): + with ( + self.assertRaises(ValidationError), + self.assertLogs(level=logging.WARNING), + ): report_paperformat.update( {"custom_params": [(0, 0, {"name": "bad-parameter"})]} ) diff --git a/report_wkhtmltopdf_param/views/paperformat.xml b/report_wkhtmltopdf_param/views/paperformat.xml index 9a185055f4..aba19705a1 100644 --- a/report_wkhtmltopdf_param/views/paperformat.xml +++ b/report_wkhtmltopdf_param/views/paperformat.xml @@ -8,10 +8,10 @@ - + - +