diff --git a/report_qweb_pdf_fixed_column/README.rst b/report_qweb_pdf_fixed_column/README.rst new file mode 100644 index 00000000..7da20798 --- /dev/null +++ b/report_qweb_pdf_fixed_column/README.rst @@ -0,0 +1,106 @@ +============================ +Report Qweb PDF Fixed Column +============================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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%2Freporting--engine-lightgray.png?logo=github + :target: https://github.com/OCA/reporting-engine/tree/12.0/report_qweb_pdf_fixed_column + :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_qweb_pdf_fixed_column + :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 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +In the generated reports, the fields relative to the order details are not +correctly displayed: they are both "cut" from the view, or the general +font size is scaled down to make all the element fit which is not the +default behavior. The font size should remain fixed and all the element +should be visible, eventually spanning over multiple lines. + +This is due to the broken bootstrap 4 support of QtWebKit, used by +wkhtmltopdf to generate pdf reports. +In particular the new flexbox style introduced in the library is not +supported and every element based on it will be ill-displayed. + +This module changes the .col-auto behavior to work similiar as in +older Odoo versions. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +The changes are applied to all reports automatically. + +Known issues / Roadmap +====================== + +* This module is not needed in Odoo 13.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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* agr-odoo +* `Tecnativa `_: + + * Alexandre Díaz + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +.. |maintainer-Tardo| image:: https://github.com/Tardo.png?size=40px + :target: https://github.com/Tardo + :alt: Tardo + +Current `maintainer `__: + +|maintainer-Tardo| + +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_qweb_pdf_fixed_column/__init__.py b/report_qweb_pdf_fixed_column/__init__.py new file mode 100644 index 00000000..db9488e1 --- /dev/null +++ b/report_qweb_pdf_fixed_column/__init__.py @@ -0,0 +1 @@ +# Hi, i'm a python module diff --git a/report_qweb_pdf_fixed_column/__manifest__.py b/report_qweb_pdf_fixed_column/__manifest__.py new file mode 100644 index 00000000..8abb9219 --- /dev/null +++ b/report_qweb_pdf_fixed_column/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2020 Tecnativa - Alexandre Díaz +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Report Qweb PDF Fixed Column', + 'summary': """ + Fix auto-col to not change report font size caused by a + boundary overflow""", + 'version': '12.0.1.0.0', + 'license': 'AGPL-3', + 'category': 'Reporting', + 'author': 'Tecnativa, Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/reporting-engine', + 'depends': [ + 'web', + ], + 'data': [ + 'views/assets.xml', + ], + 'maintainers': ['Tardo'], + 'development_status': 'Beta', +} diff --git a/report_qweb_pdf_fixed_column/readme/CONTRIBUTORS.rst b/report_qweb_pdf_fixed_column/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..c22bd917 --- /dev/null +++ b/report_qweb_pdf_fixed_column/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* agr-odoo +* `Tecnativa `_: + + * Alexandre Díaz diff --git a/report_qweb_pdf_fixed_column/readme/DESCRIPTION.rst b/report_qweb_pdf_fixed_column/readme/DESCRIPTION.rst new file mode 100644 index 00000000..8fc5fb18 --- /dev/null +++ b/report_qweb_pdf_fixed_column/readme/DESCRIPTION.rst @@ -0,0 +1,13 @@ +In the generated reports, the fields relative to the order details are not +correctly displayed: they are both "cut" from the view, or the general +font size is scaled down to make all the element fit which is not the +default behavior. The font size should remain fixed and all the element +should be visible, eventually spanning over multiple lines. + +This is due to the broken bootstrap 4 support of QtWebKit, used by +wkhtmltopdf to generate pdf reports. +In particular the new flexbox style introduced in the library is not +supported and every element based on it will be ill-displayed. + +This module changes the .col-auto behavior to work similiar as in +older Odoo versions. diff --git a/report_qweb_pdf_fixed_column/readme/ROADMAP.rst b/report_qweb_pdf_fixed_column/readme/ROADMAP.rst new file mode 100644 index 00000000..651881c1 --- /dev/null +++ b/report_qweb_pdf_fixed_column/readme/ROADMAP.rst @@ -0,0 +1 @@ +* This module is not needed in Odoo 13.0+ diff --git a/report_qweb_pdf_fixed_column/readme/USAGE.rst b/report_qweb_pdf_fixed_column/readme/USAGE.rst new file mode 100644 index 00000000..e2c2a81e --- /dev/null +++ b/report_qweb_pdf_fixed_column/readme/USAGE.rst @@ -0,0 +1 @@ +The changes are applied to all reports automatically. diff --git a/report_qweb_pdf_fixed_column/static/description/icon.png b/report_qweb_pdf_fixed_column/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/report_qweb_pdf_fixed_column/static/description/icon.png differ diff --git a/report_qweb_pdf_fixed_column/static/description/index.html b/report_qweb_pdf_fixed_column/static/description/index.html new file mode 100644 index 00000000..0ac176de --- /dev/null +++ b/report_qweb_pdf_fixed_column/static/description/index.html @@ -0,0 +1,447 @@ + + + + + + +Report Qweb PDF Fixed Column + + + +
+

Report Qweb PDF Fixed Column

+ + +

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

+

In the generated reports, the fields relative to the order details are not +correctly displayed: they are both “cut” from the view, or the general +font size is scaled down to make all the element fit which is not the +default behavior. The font size should remain fixed and all the element +should be visible, eventually spanning over multiple lines.

+

This is due to the broken bootstrap 4 support of QtWebKit, used by +wkhtmltopdf to generate pdf reports. +In particular the new flexbox style introduced in the library is not +supported and every element based on it will be ill-displayed.

+

This module changes the .col-auto behavior to work similiar as in +older Odoo versions.

+

Table of contents

+ +
+

Usage

+

The changes are applied to all reports automatically.

+
+
+

Known issues / Roadmap

+
    +
  • This module is not needed in Odoo 13.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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+
    +
  • agr-odoo
  • +
  • Tecnativa:
      +
    • Alexandre Díaz
    • +
    +
  • +
+
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

Current maintainer:

+

Tardo

+

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_qweb_pdf_fixed_column/static/src/css/report_qweb_pdf_fixed_column.scss b/report_qweb_pdf_fixed_column/static/src/css/report_qweb_pdf_fixed_column.scss new file mode 100644 index 00000000..4004e4cb --- /dev/null +++ b/report_qweb_pdf_fixed_column/static/src/css/report_qweb_pdf_fixed_column.scss @@ -0,0 +1,7 @@ +/* Original fix by 'agr-odoo': https://github.com/odoo/odoo/pull/35795 */ +.col-auto { + // This is only used in QtWebKit + -webkit-box-flex: 1 !important; + box-flex: 1 !important; + width: 100% !important; +} diff --git a/report_qweb_pdf_fixed_column/views/assets.xml b/report_qweb_pdf_fixed_column/views/assets.xml new file mode 100644 index 00000000..b6b38358 --- /dev/null +++ b/report_qweb_pdf_fixed_column/views/assets.xml @@ -0,0 +1,15 @@ + + + + + + + +