OdooWiki OCA HUB

Report Qweb Decimal Place

report_qweb_decimal_place folder_open OCA/reporting-engine open_in_new
Reporting License: LGPL-3

This module intends to provide the base function for currencies to adjust the number of decimal places for the unit price in QWeb reports. Installing this module alone does not affect the presentation of existing QWeb reports. Individual adjustments need to be done in separate modules in a manner similar to the following:

Background:

Odoo default reports display price unit with the decimal accuracy of product price configuration. However, globally applying the decimal accuracy setting is sometimes not appropriate under multi-currency settings where how unit prices should be presented differs depending on the currency.

For example, unit prices in JPY usually do not have decimals (with some exceptions depending on the industry), while those in USD may require up to 2-4 decimals. If we configure the decimal accuracy based on USD, the unit price presentation on PDF reports for JPY transactions may appear a bit unconventional.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Adds two settings on each currency so you can control how many decimals unit prices show on PDF reports. Installing it alone changes nothing visible; other report modules must use the new formatting template.

This module gives you a way to decide, currency by currency, how many decimal places unit prices should show on PDF reports. It does not change any existing report by itself.

On the currency form (Accounting/Configuration/Currencies, the standard currency screen), two new fields appear after the currency subunit label:

  • "Apply this decimal place to the unit price field of relevant PDF reports" — a checkbox that turns the setting on for that currency.
  • "Define decimal places for the unit price field of relevant PDF reports" — a whole number that says how many decimals to show. This field is only visible when the checkbox is ticked.

It also provides a reusable report template named price_unit_value_format. When a report uses it, the unit price is printed with the number of decimals defined on the currency, but only if the checkbox is ticked for that currency. If the checkbox is not ticked, the template prints nothing, so the report keeps its normal behaviour.

In short: this is a building block. It stores the preference on res.currency and offers the formatting template, while the actual report adjustments must be done in separate modules. No menus, scheduled jobs, emails or automatic calculations are added.

Depends on

base
Models and fields (1)
  • res.currency · extends an existing modelprice_decimal_places, apply_price_decimal_place

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

Sources · Odoo 15.0

Confirmed on 2026-11-03 in branch 15.0 of OCA/reporting-engine.

terminal Installation and usage

OCA documentation · Odoo 16.0

To apply price unit format:

  • Go to Invoicing --> Configuration --> Currencies
  • Check apply_price_decimal_place field
  • Define decimal place in price_decimal_place field

Inherit this module in your xxx_report_qweb_decimal_place module and format the price unit in reports.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.