Skip to content

Commit fe81fd5

Browse files
authored
Merge pull request #920 from OCA/18.0
Syncing from upstream OCA/reporting-engine (18.0)
2 parents 30b817b + ce8b49d commit fe81fd5

27 files changed

Lines changed: 1559 additions & 10 deletions

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ addon | version | maintainers | summary
3333
[report_partner_address](report_partner_address/) | 18.0.1.0.0 | <a href='https://github.com/yostashiro'><img src='https://github.com/yostashiro.png' width='32' height='32' style='border-radius:50%;' alt='yostashiro'/></a> <a href='https://github.com/aungkokolin1997'><img src='https://github.com/aungkokolin1997.png' width='32' height='32' style='border-radius:50%;' alt='aungkokolin1997'/></a> | Translatable partner address details for reports and portal
3434
[report_pdf_form](report_pdf_form/) | 18.0.1.0.0 | <a href='https://github.com/grindtildeath'><img src='https://github.com/grindtildeath.png' width='32' height='32' style='border-radius:50%;' alt='grindtildeath'/></a> | Fill custom PDF form reports
3535
[report_pdf_zip_download](report_pdf_zip_download/) | 18.0.1.0.0 | | Report PDF ZIP Download
36-
[report_py3o](report_py3o/) | 18.0.1.0.2 | | Reporting engine based on Libreoffice (ODT -> ODT, ODT -> PDF, ODT -> DOC, ODT -> DOCX, ODS -> ODS, etc.)
36+
[report_positioned_image](report_positioned_image/) | 18.0.1.0.0 | | Add positioned images to PDF reports.
37+
[report_py3o](report_py3o/) | 18.0.1.0.3 | | Reporting engine based on Libreoffice (ODT -> ODT, ODT -> PDF, ODT -> DOC, ODT -> DOCX, ODS -> ODS, etc.)
3738
[report_py3o_fusion_server](report_py3o_fusion_server/) | 18.0.1.0.0 | | Let the fusion server handle format conversion.
3839
[report_qr](report_qr/) | 18.0.1.0.0 | | Web QR Manager
3940
[report_qweb_element_page_visibility](report_qweb_element_page_visibility/) | 18.0.1.0.0 | | Report Qweb Element Page Visibility

report_positioned_image/README.rst

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
=======================
6+
Report Positioned Image
7+
=======================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:7492b81c95084617eacd2468003a6783881838c17e7ef230b84bf4d6733dc0e3
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
24+
:target: https://github.com/OCA/reporting-engine/tree/18.0/report_positioned_image
25+
:alt: OCA/reporting-engine
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_positioned_image
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module allows you to add positioned images (such as watermarks,
36+
logos, or stamps) to PDF reports. Images can be precisely positioned
37+
using millimeter coordinates (top, left) and you can control whether
38+
they appear on all pages or only the first page.
39+
40+
The module supports two types of images:
41+
42+
- *Company-level Images*: Define images at the company level that can be
43+
included in reports by enabling the *Include Company Images* option
44+
- *Report-specific Images*: Configure specific images for individual
45+
reports, filtered by company context and always shown when configured
46+
47+
Images can be assigned to a specific company or left as shared records
48+
(without company assignment) for use across multiple companies
49+
50+
**Table of contents**
51+
52+
.. contents::
53+
:local:
54+
55+
Configuration
56+
=============
57+
58+
To configure company-level images:
59+
60+
1. Go to *Settings / Companies*
61+
2. Open your company record
62+
3. Navigate to the *Report Images* tab
63+
4. Add images with position settings:
64+
65+
- Upload an image - width defaults to 50mm and height is
66+
automatically calculated to maintain the original aspect ratio
67+
- *Top (mm)*: Distance from the top of the page
68+
- *Left (mm)*: Distance from the left edge of the page
69+
- *Width (mm)*: Width of the image (changing this auto-adjusts
70+
height)
71+
- *Height (mm)*: Height of the image (changing this auto-adjusts
72+
width)
73+
- *Respect Image Ratio*: When enabled (default), changing width or
74+
height automatically adjusts the other dimension to maintain aspect
75+
ratio. Uncheck for manual control of both dimensions.
76+
- *First Page Only*: Check to show only on the first page
77+
- *Company*: Automatically set to the current company when creating
78+
from the company form. To create shared images, leave empty.
79+
80+
To configure report-specific images:
81+
82+
1. Go to *Settings / Technical / Actions / Reports*
83+
2. Open the report you want to customize
84+
3. Navigate to the *Report Images* tab
85+
4. Check *Include Company Images* if you want to show company-level
86+
images in addition to report-specific images
87+
5. Add report-specific images in the list with the same position
88+
settings as above
89+
90+
**Note**: By default, images maintain their aspect ratio. When you
91+
upload an image, it's automatically sized to 50mm width with
92+
proportional height. You can then adjust either dimension and the other
93+
will update automatically to prevent distortion.
94+
95+
Bug Tracker
96+
===========
97+
98+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
99+
In case of trouble, please check there if your issue has already been reported.
100+
If you spotted it first, help us to smash it by providing a detailed and welcomed
101+
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_positioned_image%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
102+
103+
Do not contact contributors directly about support or help with technical issues.
104+
105+
Credits
106+
=======
107+
108+
Authors
109+
-------
110+
111+
* Quartile
112+
113+
Contributors
114+
------------
115+
116+
- Quartile <https://www.quartile.co>
117+
118+
- Tatsuki Kanda
119+
- Aung Ko Ko Lin
120+
121+
Maintainers
122+
-----------
123+
124+
This module is maintained by the OCA.
125+
126+
.. image:: https://odoo-community.org/logo.png
127+
:alt: Odoo Community Association
128+
:target: https://odoo-community.org
129+
130+
OCA, or the Odoo Community Association, is a nonprofit organization whose
131+
mission is to support the collaborative development of Odoo features and
132+
promote its widespread use.
133+
134+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_positioned_image>`_ project on GitHub.
135+
136+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright 2026 Quartile (https://www.quartile.co)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
{
4+
"name": "Report Positioned Image",
5+
"summary": "Add positioned images to PDF reports.",
6+
"version": "18.0.1.0.0",
7+
"category": "Reporting",
8+
"author": "Quartile, Odoo Community Association (OCA)",
9+
"website": "https://github.com/OCA/reporting-engine",
10+
"license": "AGPL-3",
11+
"depends": ["web", "report_qweb_element_page_visibility"],
12+
"data": [
13+
"security/ir.model.access.csv",
14+
"security/report_positioned_image_security.xml",
15+
"views/report_positioned_image_views.xml",
16+
"views/res_company_views.xml",
17+
"views/ir_actions_report_views.xml",
18+
],
19+
"installable": True,
20+
}
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_positioned_image
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: report_positioned_image
17+
#: model:ir.model,name:report_positioned_image.model_res_company
18+
msgid "Companies"
19+
msgstr ""
20+
21+
#. module: report_positioned_image
22+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__company_id
23+
msgid "Company"
24+
msgstr ""
25+
26+
#. module: report_positioned_image
27+
#. odoo-python
28+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
29+
msgid "Company Assignment"
30+
msgstr ""
31+
32+
#. module: report_positioned_image
33+
#: model:ir.model.fields,field_description:report_positioned_image.field_res_company__report_positioned_image_ids
34+
msgid "Company Images"
35+
msgstr ""
36+
37+
#. module: report_positioned_image
38+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__create_uid
39+
msgid "Created by"
40+
msgstr ""
41+
42+
#. module: report_positioned_image
43+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__create_date
44+
msgid "Created on"
45+
msgstr ""
46+
47+
#. module: report_positioned_image
48+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__display_name
49+
msgid "Display Name"
50+
msgstr ""
51+
52+
#. module: report_positioned_image
53+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__first_page_only
54+
msgid "First Page Only"
55+
msgstr ""
56+
57+
#. module: report_positioned_image
58+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__height
59+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_act_report_form_positioned_image
60+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_company_form_positioned_image
61+
msgid "Height (mm)"
62+
msgstr ""
63+
64+
#. module: report_positioned_image
65+
#. odoo-python
66+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
67+
msgid "Height must be greater than zero."
68+
msgstr ""
69+
70+
#. module: report_positioned_image
71+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__id
72+
msgid "ID"
73+
msgstr ""
74+
75+
#. module: report_positioned_image
76+
#: model:ir.model.fields,help:report_positioned_image.field_ir_actions_report__include_company_images
77+
#: model:ir.model.fields,help:report_positioned_image.field_report_pdf_form__include_company_images
78+
msgid ""
79+
"If checked, company-level images will be shown in addition to report-"
80+
"specific images."
81+
msgstr ""
82+
83+
#. module: report_positioned_image
84+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__image
85+
msgid "Image"
86+
msgstr ""
87+
88+
#. module: report_positioned_image
89+
#: model:ir.model.fields,field_description:report_positioned_image.field_ir_actions_report__include_company_images
90+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_pdf_form__include_company_images
91+
msgid "Include Company Images"
92+
msgstr ""
93+
94+
#. module: report_positioned_image
95+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__write_uid
96+
msgid "Last Updated by"
97+
msgstr ""
98+
99+
#. module: report_positioned_image
100+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__write_date
101+
msgid "Last Updated on"
102+
msgstr ""
103+
104+
#. module: report_positioned_image
105+
#: model:ir.model.fields,help:report_positioned_image.field_report_positioned_image__company_id
106+
msgid ""
107+
"Leave empty to apply to all companies. Set a specific company to restrict "
108+
"this image to that company only."
109+
msgstr ""
110+
111+
#. module: report_positioned_image
112+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__pos_left
113+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_act_report_form_positioned_image
114+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_company_form_positioned_image
115+
msgid "Left (mm)"
116+
msgstr ""
117+
118+
#. module: report_positioned_image
119+
#. odoo-python
120+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
121+
msgid "Left position must be a positive value."
122+
msgstr ""
123+
124+
#. module: report_positioned_image
125+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__name
126+
msgid "Name"
127+
msgstr ""
128+
129+
#. module: report_positioned_image
130+
#: model:ir.model,name:report_positioned_image.model_ir_actions_report
131+
msgid "Report Action"
132+
msgstr ""
133+
134+
#. module: report_positioned_image
135+
#: model:ir.model.fields,field_description:report_positioned_image.field_ir_actions_report__report_positioned_image_ids
136+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_pdf_form__report_positioned_image_ids
137+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_act_report_form_positioned_image
138+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_company_form_positioned_image
139+
msgid "Report Images"
140+
msgstr ""
141+
142+
#. module: report_positioned_image
143+
#: model:ir.model,name:report_positioned_image.model_report_positioned_image
144+
msgid "Report Positioned Image"
145+
msgstr ""
146+
147+
#. module: report_positioned_image
148+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__respect_image_ratio
149+
msgid "Respect Image Ratio"
150+
msgstr ""
151+
152+
#. module: report_positioned_image
153+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__pos_top
154+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_act_report_form_positioned_image
155+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_company_form_positioned_image
156+
msgid "Top (mm)"
157+
msgstr ""
158+
159+
#. module: report_positioned_image
160+
#. odoo-python
161+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
162+
msgid "Top position must be a positive value."
163+
msgstr ""
164+
165+
#. module: report_positioned_image
166+
#: model:ir.model.fields,help:report_positioned_image.field_report_positioned_image__respect_image_ratio
167+
msgid ""
168+
"When enabled, changing width or height will automatically adjust the other "
169+
"dimension to maintain the original image aspect ratio."
170+
msgstr ""
171+
172+
#. module: report_positioned_image
173+
#: model:ir.model.fields,field_description:report_positioned_image.field_report_positioned_image__width
174+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_act_report_form_positioned_image
175+
#: model_terms:ir.ui.view,arch_db:report_positioned_image.view_company_form_positioned_image
176+
msgid "Width (mm)"
177+
msgstr ""
178+
179+
#. module: report_positioned_image
180+
#. odoo-python
181+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
182+
msgid "Width must be greater than zero."
183+
msgstr ""
184+
185+
#. module: report_positioned_image
186+
#. odoo-python
187+
#: code:addons/report_positioned_image/models/report_positioned_image.py:0
188+
msgid ""
189+
"You cannot assign this image to a different company. Please use the "
190+
"dedicated wizard to assign images to other companies."
191+
msgstr ""
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from . import ir_actions_report
2+
from . import report_positioned_image
3+
from . import res_company

0 commit comments

Comments
 (0)