Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2a5d2f9
[ADD] report_qweb_field_option
AungKoKoLin1997 Feb 26, 2024
fbe8a1b
[UPD] Update report_qweb_field_option.pot
Mar 13, 2025
e2bcd92
[BOT] post-merge updates
OCA-git-bot Mar 13, 2025
656cd14
[IMP] report_qweb_field_option: remove odoo_test_helper from manifest
AungKoKoLin1997 Mar 14, 2025
45b36e5
[BOT] post-merge updates
OCA-git-bot Mar 14, 2025
d77d151
Added translation using Weblate (Italian)
mymage Mar 18, 2025
2876619
Translated using Weblate (Italian)
mymage Mar 30, 2025
8cfd415
[IMP] report_qweb_field_option: pre-commit auto fixes
AungKoKoLin1997 Jun 12, 2025
b6424c1
[MIG] report_qweb_field_option: Migration to 18.0
AungKoKoLin1997 Jun 12, 2025
ceaad62
[FIX] report_qweb_field_option: fix not working for uom specific
AungKoKoLin1997 Jul 23, 2025
9f4e2b8
[UPD] Update report_qweb_field_option.pot
Sep 10, 2025
4234a66
[BOT] post-merge updates
OCA-git-bot Sep 10, 2025
53c27af
Added translation using Weblate (Dutch)
bosd Sep 11, 2025
96037f9
Added translation using Weblate (Dutch (nl_NL))
bosd Sep 11, 2025
abd1927
[IMP] report_qweb_field_option: Update ROADMAP
nobuQuartile Sep 11, 2025
739dfb0
Translated using Weblate (Dutch (nl_NL))
bosd Sep 11, 2025
6580a9f
[BOT] post-merge updates
OCA-git-bot Sep 12, 2025
467ab97
[MIG] report_qweb_field_option: Migration to 19.0
AungKoKoLin1997 Oct 9, 2025
42092a0
[IMP] report_qweb_field_option: add domain field for better controlli…
AungKoKoLin1997 Mar 2, 2026
a4b7ca6
Added translation using Weblate (Italian)
mymage Mar 23, 2026
506ea8f
Translated using Weblate (Italian)
mymage Mar 23, 2026
50c6d38
Merge PR #1075 into 19.0
OCA-git-bot Mar 23, 2026
a62df18
[UPD] Update report_qweb_field_option.pot
Mar 23, 2026
f28a1b6
[BOT] post-merge updates
OCA-git-bot Mar 23, 2026
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ addon | version | maintainers | summary
[report_csv](report_csv/) | 19.0.1.0.0 | | Base module to create csv report
[report_partner_address](report_partner_address/) | 19.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
[report_qweb_element_page_visibility](report_qweb_element_page_visibility/) | 19.0.1.0.0 | | Report Qweb Element Page Visibility
[report_qweb_field_option](report_qweb_field_option/) | 19.0.1.0.0 | | Report Qweb Field Option
[report_qweb_parameter](report_qweb_parameter/) | 19.0.1.0.0 | | Add new parameters for qweb templates in order to reduce field length and check minimal length
[report_xlsx](report_xlsx/) | 19.0.1.0.2 | | Base module to create xlsx report
[report_xlsx_helper](report_xlsx_helper/) | 19.0.1.0.0 | | Report xlsx helpers
Expand Down
49 changes: 49 additions & 0 deletions report_partner_address/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_partner_address
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 19.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2026-03-23 10:45+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.15.2\n"

#. module: report_partner_address
#: model:ir.model.fields,field_description:report_partner_address.field_res_partner__address_details
#: model:ir.model.fields,field_description:report_partner_address.field_res_users__address_details
msgid "Address Details"
msgstr "Dettagli indirizzo"

#. module: report_partner_address
#: model:ir.model,name:report_partner_address.model_res_partner
msgid "Contact"
msgstr "Contatto"

#. module: report_partner_address
#: model:ir.model.fields,help:report_partner_address.field_res_partner__address_details
#: model:ir.model.fields,help:report_partner_address.field_res_users__address_details
msgid ""
"Custom address format used in reports and portal pages. When set, this "
"replaces the standard address format for external display."
msgstr ""
"Formato indirizzo cliente utilizzato nei resoconti e nella pagine portale. "
"Quando impostato, sostituisce il formato standard indirizzo per "
"visualizzazione esterna."

#. module: report_partner_address
#: model:ir.model.fields,field_description:report_partner_address.field_res_partner__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: report_partner_address
#: model:ir.model.fields,field_description:report_partner_address.field_res_partner__id
msgid "ID"
msgstr "ID"
141 changes: 141 additions & 0 deletions report_qweb_field_option/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

========================
Report Qweb Field Option
========================

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

.. |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/license-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/19.0/report_qweb_field_option
: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-19-0/reporting-engine-19-0-report_qweb_field_option
: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=19.0
:alt: Try me on Runboat

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

This module allows administrators to define the decimal precision of
float fields and add option values to fields (e.g., adding a date widget
option to datetime fields) for QWeb report and view presentation.

**Table of contents**

.. contents::
:local:

Configuration
=============

Go to *Settings > Technical > Reporting > Qweb Field Options*, and
create records according to your needs.

For each record:

- Set **Model** and **Field** (required)
- Set **UoM** and **UoM Field**, or **Currency** and **Currency Field**
only for fields of float type (optional)
- Set **Domain** to specify a domain for more specific filtering (e.g.,
``[('secondary_uom_id', '=', 1)]`` to apply only when a specific
secondary UoM is used) (optional)
- Set **Company** (optional)
- Set **Options** as a string representation of a dictionary. E.g.,
``{"widget": "date"}``, ``{"widget": "monetary"}``, or
``{"widget": "contact", "fields": ["name", "phone"]}``
- Set **Digits** (only for float-type fields). The value is ignored if
Options is set

Usage
=====

Print a QWeb report (quotation, invoice, purchase order, etc.), and the
value presentation for fields like line quantity, price unit and date
order are adjusted according to the Qweb Field Options configuration.

Note that among matching configuration records, the one with the
strictest condition will be applied.

Known issues / Roadmap
======================

| #. QWeb field option settings only apply to fields rendered with
``t-field``.
| They don’t work with ``t-esc`` or other expressions not using
``t-field``.

As a workaround, you could create a module that adds a computed field
holding the same value currently computed and displayed in the QWeb
report using ``t-esc``, and adjust the report template to display the
field value using ``t-field``. This would allow you to adjust the
decimal precision as needed.

#. Assigning Options in a QWeb Field Options record can cause UI issues
if a field is defined twice with different widgets in a view.

For example, adding ``{"widget": "date"}`` to the date_approve field in
a purchase order can result in two dates appearing under the
Confirmation Date column in the portal view. This occurs because the
field is defined twice with different widgets.

Reference:
https://github.com/odoo/odoo/blob/5eec379/addons/purchase/views/portal_templates.xml#L101-L102

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/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/reporting-engine/issues/new?body=module:%20report_qweb_field_option%0Aversion:%2019.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
-------

* Quartile

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

- `Quartile <https://www.quartile.co>`__:

- Yoshi Tashiro
- Aung Ko Ko Lin

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/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_qweb_field_option>`_ 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 report_qweb_field_option/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions report_qweb_field_option/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024-2025 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Report Qweb Field Option",
"version": "19.0.1.0.0",
"category": "Technical Settings",
"license": "AGPL-3",
"author": "Quartile, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"depends": ["uom"],
"data": [
"security/ir.model.access.csv",
"security/qweb_field_options_security.xml",
"views/qweb_field_options_views.xml",
],
"installable": True,
}
167 changes: 167 additions & 0 deletions report_qweb_field_option/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_qweb_field_option
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-03-30 21:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.10.2\n"

#. module: report_qweb_field_option
#: model:ir.model.fields,help:report_qweb_field_option.field_qweb_field_options__field_options
msgid ""
"A string representation of a dictionary to specify field formatting options. Examples:\n"
"{'widget': 'date'}\n"
"{'widget': 'monetary'}\n"
"{'widget': 'contact', 'fields': ['name', 'phone']}"
msgstr ""
"Una stringa che rappresenta un dizionario per indicare le opzioni di "
"formattazione dei campi. Esempi:\n"
"{'widget': 'date'}\n"
"{'widget': 'monetary'}\n"
"{'widget': 'contact', 'fields': ['name', 'phone']}"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__company_id
msgid "Company"
msgstr "Azienda"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__create_uid
msgid "Created by"
msgstr "Creato da"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__create_date
msgid "Created on"
msgstr "Creato il"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__currency_id
msgid "Currency"
msgstr "Valuta"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__currency_field_id
msgid "Currency Field"
msgstr "Campo valuta"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__digits
msgid "Digits"
msgstr "Cifre"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__field_id
msgid "Field"
msgstr "Campo"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__field_name
msgid "Field Name"
msgstr "Nome campo"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__field_type
msgid "Field Type"
msgstr "Tipo campo"

#. module: report_qweb_field_option
#: model_terms:ir.ui.view,arch_db:report_qweb_field_option.view_qweb_field_options_searh
msgid "Group By"
msgstr "Raggruppa per"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__id
msgid "ID"
msgstr "ID"

#. module: report_qweb_field_option
#. odoo-python
#: code:addons/report_qweb_field_option/models/qweb_field_options.py:0
#, python-format
msgid ""
"Invalid string for the Options field: %(field_options)s.\n"
"Error: %(error)s"
msgstr ""
"Stringa non valida per il campo opzioni: %(field_options)s.\n"
"Errore: %(error)s"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__res_model_id
#: model_terms:ir.ui.view,arch_db:report_qweb_field_option.view_qweb_field_options_searh
msgid "Model"
msgstr "Modello"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__res_model_name
msgid "Model Name"
msgstr "Nome modello"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__field_options
msgid "Options"
msgstr "Opzioni"

#. module: report_qweb_field_option
#. odoo-python
#: code:addons/report_qweb_field_option/models/qweb_field_options.py:0
#, python-format
msgid "Options must be a dictionary, but got %s"
msgstr "Le opzioni devono essere un dizionario, ma sono %s"

#. module: report_qweb_field_option
#: model:ir.model,name:report_qweb_field_option.model_ir_qweb
msgid "Qweb"
msgstr "Qweb"

#. module: report_qweb_field_option
#: model:ir.actions.act_window,name:report_qweb_field_option.action_qweb_field_options_view
#: model:ir.model,name:report_qweb_field_option.model_qweb_field_options
#: model:ir.ui.menu,name:report_qweb_field_option.menu_qweb_field_options
msgid "Qweb Field Options"
msgstr "Opzioni campo Qweb"

#. module: report_qweb_field_option
#: model_terms:ir.ui.view,arch_db:report_qweb_field_option.view_qweb_field_options_searh
msgid "Qweb Field Options Search"
msgstr "Ricerca opzioni campo Qweb"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__uom_id
msgid "UoM"
msgstr "UdM"

#. module: report_qweb_field_option
#: model:ir.model.fields,field_description:report_qweb_field_option.field_qweb_field_options__uom_field_id
msgid "UoM Field"
msgstr "Campo UdM"
Loading
Loading