Skip to content

[14.0][IMP] uom_rounding_coherence: block rounding changes that invalidate stock data#872

Merged
eantones merged 2 commits into14.0from
14.0-imp-uom_rounding_coherence-stock_quant_check
Mar 27, 2026
Merged

[14.0][IMP] uom_rounding_coherence: block rounding changes that invalidate stock data#872
eantones merged 2 commits into14.0from
14.0-imp-uom_rounding_coherence-stock_quant_check

Conversation

@eantones
Copy link
Copy Markdown
Member

Summary

  • Add stock quant coherence constraint: when changing a UoM rounding, checks that all existing stock quant quantities fit within the new rounding
  • Prevents making rounding coarser than the data allows (e.g., changing from 0.001 to 0.01 when quants with 3 decimals exist)
  • Add stock as dependency (was uom only)
  • Bump version to 14.0.1.1.0

Test plan

  • 13 tests pass (11 existing + 2 new)
  • Pre-commit passes cleanly
  • Verify on production: changing CO2 UoM rounding from 0.001 to 0.01 is blocked
  • Verify on production: changing CO2 UoM rounding from 0.001 to 0.0001 is allowed

…stock data

When making UoM rounding coarser (e.g. 0.001 to 0.01), existing stock
quants with more decimal places than the new rounding would become
invalid and block stock operations. This adds a constraint that checks
all stock quant quantities before allowing a rounding change.

This prevents the scenario where someone changes a UoM rounding to a
coarser value without realising the existing data has finer precision,
which later causes validation errors on inventory, stock moves and
flowable location operations.

Also adds stock as a dependency (was uom only) and bumps version to
14.0.1.1.0.
Add complete Catalan (ca) and Spanish (es) translations for all module
strings, including the new stock quant coherence validation message.
@eantones eantones force-pushed the 14.0-imp-uom_rounding_coherence-stock_quant_check branch from 82f981f to 0c2da09 Compare March 27, 2026 09:54
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.63%. Comparing base (ce814c2) to head (0c2da09).
⚠️ Report is 4 commits behind head on 14.0.

Additional details and impacted files
@@            Coverage Diff             @@
##             14.0     #872      +/-   ##
==========================================
+ Coverage   50.53%   50.63%   +0.10%     
==========================================
  Files         979      979              
  Lines       16685    16724      +39     
  Branches     3558     3562       +4     
==========================================
+ Hits         8432     8469      +37     
- Misses       8034     8038       +4     
+ Partials      219      217       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eantones eantones merged commit c0d0de9 into 14.0 Mar 27, 2026
13 checks passed
@eantones eantones deleted the 14.0-imp-uom_rounding_coherence-stock_quant_check branch March 27, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant