Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f490829
[IMP] Adds a font size selector (pt) to the Document Layout wizard
ajfebres Aug 31, 2025
5ddece7
Merge pull request #1 from BinhexTeam/17.0-web_font_size_report_layout
syci Sep 3, 2025
d369d30
Update README.rst
syci Sep 3, 2025
6410b4c
Update README.rst
syci Sep 3, 2025
fd39cab
[FIX] web_font_size_report_layout: readme
syci Sep 3, 2025
b6165a2
[ADD] web_font_size_report_layout: tests
syci Sep 3, 2025
89da7fe
[FIX] web_font_size_report_layout: tests
syci Sep 3, 2025
28f0979
[FIX] web_font_size_report_layout: tests
syci Sep 3, 2025
68cf1b3
[FIX] web_font_size_report_layout: tests
syci Sep 3, 2025
14f782e
Merge remote-tracking branch 'upstream/17.0' into 17.0
ajfebres Sep 25, 2025
df843d5
[ADD] web_pwa_customize: New module
victoralmau Nov 8, 2024
2af8727
[UPD] Update web_pwa_customize.pot
Jul 29, 2025
95eb02f
[BOT] post-merge updates
OCA-git-bot Jul 29, 2025
3831b49
Added translation using Weblate (Italian)
mymage Jul 30, 2025
aa161d8
[FIX] web_responsive: prevent error in tests when accessing an undefi…
carlos-lopez-tecnativa Aug 5, 2025
49c8939
[BOT] post-merge updates
OCA-git-bot Aug 6, 2025
1f66ab1
Translated using Weblate (Italian)
mymage Aug 6, 2025
b299dd0
[IMP] web_widget_product_label_section_and_note: force a width on the…
carlos-lopez-tecnativa Aug 8, 2025
b198568
[BOT] post-merge updates
OCA-git-bot Aug 12, 2025
834c64f
[FIX] web_widget_x2many_2d_matrix: restore pre-v17 functionality (axes)
hbrunn Aug 8, 2025
69b506d
[UPD] Update web_widget_x2many_2d_matrix.pot
Aug 18, 2025
68c4cca
[BOT] post-merge updates
OCA-git-bot Aug 18, 2025
d9ba747
Update translation files
weblate Aug 18, 2025
0c70c31
Translated using Weblate (Italian)
mymage Aug 19, 2025
a9f773e
Translated using Weblate (French)
remi-filament Sep 8, 2025
bf3634b
Merge pull request #3 from BinhexTeam/17.0
syci Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions web_font_size_report_layout/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
===================================
Report Font Size in Document Layout
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ee6f96a1077aace09df8bdf60b5d93ee172924b3bf73a462880b7c52adf87ab2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/17.0/web_font_size_report_layout
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_font_size_report_layout
: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/web&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This Odoo module adds the capability to customize font size in all PDF
reports throughout the system. Through a simple configuration,
administrators can select from a range of predefined font sizes
(measured in points) to optimize readability and appearance of invoices,
quotations, sales orders, and other printed documents.

The module offers the following font size options (in points):

=========== ==== =========================
Option Size Description
=========== ==== =========================
Small 9pt For maximum compactness
Standard 10pt Odoo's default size
Large 12pt Better readability
Extra Large 14pt For high visibility needs
=========== ==== =========================

**Table of contents**

.. contents::
:local:

Installation
============

1. Copy the ``web_font_size_report_layout`` directory to your Odoo
addons folder
2. Update the module list from developer mode
3. Search for "Report Font Size in Document Layout" in the app store and
install it.

Usage
=====

Once installed:

1. Go to **Settings → General Settings → Companies → Configure Document
Layout**
2. Locate the new **"Font Size"** field
3. Select your preferred size from the dropdown list
4. Look at Preview or Download PDF Preview
5. Save changes

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/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 <https://github.com/OCA/web/issues/new?body=module:%20web_font_size_report_layout%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Binhex

Contributors
------------

- `Binhex <https://www.binhex.cloud>`__:
- Mario Montes <m.montes@binhex.cloud>
- Abraham J. Febres <a.febres@binhex.cloud>

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.

This module is part of the `OCA/web <https://github.com/OCA/web/tree/17.0/web_font_size_report_layout>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions web_font_size_report_layout/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
22 changes: 22 additions & 0 deletions web_font_size_report_layout/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Report Font Size in Document Layout",
"version": "17.0.1.1.0",
"summary": "Adds a font size selector (pt) to the Document Layout wizard",
"author": "Binhex," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"license": "LGPL-3",
"depends": ["web"],
"data": [
"views/base_document_layout_views.xml",
"views/report_templates_inherit.xml",
],
"assets": {
"web.report_assets_common": [
"web_font_size_report_layout/static/src/scss/report_font_size.scss"
],
"web.report_assets_pdf": [
"web_font_size_report_layout/static/src/scss/report_font_size.scss"
],
},
"installable": True,
}
2 changes: 2 additions & 0 deletions web_font_size_report_layout/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import res_company
from . import base_document_layout
27 changes: 27 additions & 0 deletions web_font_size_report_layout/models/base_document_layout.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# web_font_size_report_layout/models/base_document_layout.py
import logging

from odoo import api, fields, models

_logger = logging.getLogger(__name__)


class BaseDocumentLayout(models.TransientModel):
_inherit = "base.document.layout"

report_font_size = fields.Selection(
related="company_id.report_font_size",
readonly=False,
string="Font size",
)

@api.onchange("report_font_size")
def _onchange_report_font_size(self):
func = getattr(self, "_compute_preview", None)
if not callable(func):
return
try:
func()
except Exception as exc: # pylint: disable=broad-except
_logger.debug("Failed computing document layout preview: %s", exc)
self.preview = False
47 changes: 47 additions & 0 deletions web_font_size_report_layout/models/res_company.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from odoo import api, fields, models


class ResCompany(models.Model):
_inherit = "res.company"

report_font_size = fields.Selection(
selection=[
("9", "9 pt"),
("10", "10 pt"),
("11", "11 pt"),
("12", "12 pt"),
("13", "13 pt"),
("14", "14 pt"),
],
string="Report font size",
default="11",
help="Base font size for PDF content (in points), applied on the external "
"report layout.",
)

@api.model_create_multi
def create(self, vals_list):
companies = super().create(vals_list)
style_fields = {
"external_report_layout_id",
"font",
"report_font_size",
"primary_color",
"secondary_color",
}
if any(not style_fields.isdisjoint(values) for values in vals_list):
self._update_asset_style()
return companies

def write(self, values):
res = super().write(values)
style_fields = {
"external_report_layout_id",
"font",
"report_font_size",
"primary_color",
"secondary_color",
}
if not style_fields.isdisjoint(values):
self._update_asset_style()
return res
3 changes: 3 additions & 0 deletions web_font_size_report_layout/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions web_font_size_report_layout/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Binhex](https://www.binhex.cloud):
- Mario Montes\<<m.montes@binhex.cloud>\>
- Abraham J. Febres \<<afebres@binhex.cloud>\>
10 changes: 10 additions & 0 deletions web_font_size_report_layout/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This Odoo module adds the capability to customize font size in all PDF reports throughout the system. Through a simple configuration, administrators can select from a range of predefined font sizes (measured in points) to optimize readability and appearance of invoices, quotations, sales orders, and other printed documents.

The module offers the following font size options (in points):

| Option | Size | Description |
|--------|------|-------------|
| Small | 9pt | For maximum compactness |
| Standard | 10pt | Odoo's default size |
| Large | 12pt | Better readability |
| Extra Large | 14pt | For high visibility needs |
3 changes: 3 additions & 0 deletions web_font_size_report_layout/readme/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1. Copy the `web_font_size_report_layout` directory to your Odoo addons folder
2. Update the module list from developer mode
3. Search for "Report Font Size in Document Layout" in the app store and install it.
7 changes: 7 additions & 0 deletions web_font_size_report_layout/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Once installed:

1. Go to **Settings → General Settings → Companies → Configure Document Layout**
2. Locate the new **"Font Size"** field
3. Select your preferred size from the dropdown list
5. Look at Preview or Download PDF Preview
4. Save changes
Loading