Skip to content

[ADD] product_secondary_unit_ux: show secondary unit factor with more decimals - #913

Closed
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-t-69157-les-6696-fw
Closed

[ADD] product_secondary_unit_ux: show secondary unit factor with more decimals#913
fw-bot-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-18.0-t-69157-les-6696-fw

Conversation

@fw-bot-adhoc

Copy link
Copy Markdown

What

New UX module product_secondary_unit_ux that improves how the secondary unit conversion factor is displayed.

Why

The OCA product_secondary_unit "Factor" field (product.secondary.unit.factor) is declared as a plain Float with no digits. As a result the web client renders it with only 2 decimals, while the value is stored and used in conversions with full precision. Users would see e.g. 0.44 and not realize the effective value carried more precision, leading to apparent conversion mismatches.

How

A single view inherits product_secondary_unit.product_template_form_view and sets digits="[16, 6]" on the factor field via position="attributes". This is display-only: it does not change storage or rounding, so calculation behavior is unchanged.

Test plan

  1. Install the module (auto-installs when product_secondary_unit is present).
  2. Enable Units of Measure (uom.group_uom).
  3. On a product, add a secondary unit and set a factor with more than 2 decimals.
  4. The factor field shows 6 decimals (both on product template and variant forms), reflecting the real stored value.

Task: https://www.adhoc.inc/odoo/project.task/69157

Forward-Port-Of: #907

… decimals

The OCA 'product_secondary_unit' factor field has no digits, so the web client renders it with 2 decimals while storing full precision. This made the displayed value differ from the one actually used in conversions, causing confusion. New UX module forces the factor field to display 6 decimals (display-only, no change to storage or rounding).

X-original-commit: 08ff153
@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc this PR targets 19.0 and is the last of the forward-port chain.

To merge the full chain, use

@roboadhoc r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc ci/runbot-modified-modules failed on this forward-port PR

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc this forward port of #907 is awaiting action (not merged or closed).

3 similar comments
@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc this forward port of #907 is awaiting action (not merged or closed).

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc this forward port of #907 is awaiting action (not merged or closed).

@fw-bot-adhoc

Copy link
Copy Markdown
Author

@les-adhoc @mav-adhoc this forward port of #907 is awaiting action (not merged or closed).

@les-adhoc les-adhoc closed this Aug 10, 2026
@fw-bot-adhoc
fw-bot-adhoc deleted the 19.0-18.0-t-69157-les-6696-fw branch August 17, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants