Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
14
report_qweb_field_option/readme/CONFIGURE.md
Normal file
14
report_qweb_field_option/readme/CONFIGURE.md
Normal file
@@ -0,0 +1,14 @@
|
||||
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 **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
|
||||
3
report_qweb_field_option/readme/CONTRIBUTORS.md
Normal file
3
report_qweb_field_option/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- [Quartile](https://www.quartile.co):
|
||||
- Yoshi Tashiro
|
||||
- Aung Ko Ko Lin
|
||||
3
report_qweb_field_option/readme/DESCRIPTION.md
Normal file
3
report_qweb_field_option/readme/DESCRIPTION.md
Normal file
@@ -0,0 +1,3 @@
|
||||
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.
|
||||
17
report_qweb_field_option/readme/ROADMAP.md
Normal file
17
report_qweb_field_option/readme/ROADMAP.md
Normal file
@@ -0,0 +1,17 @@
|
||||
#. 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
|
||||
6
report_qweb_field_option/readme/USAGE.md
Normal file
6
report_qweb_field_option/readme/USAGE.md
Normal file
@@ -0,0 +1,6 @@
|
||||
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.
|
||||
Reference in New Issue
Block a user