diff --git a/CHANGELOG.md b/CHANGELOG.md index ba24a8d..e8873c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [17.0.1.0.2] - 2025-11-22 + +### Fixed +- **CRITICAL FIX**: Increased precision from 6 to 10 decimal places +- Fixed issue where 1,264,733 would display as 1,264,732.98 +- Now handles both small and large quantities accurately + +### Technical Details +- Changed `digits=(16, 6)` to `digits=(16, 10)` for maximum precision +- Test cases: + - 277,534 ÷ 150 = 1850.2266666667 → 277,534.00 ✅ + - 1,264,733 ÷ 60,000 = 21.0788833333 → 1,264,733.00 ✅ + ## [17.0.1.0.1] - 2025-11-21 ### Fixed diff --git a/__manifest__.py b/__manifest__.py index 71efa47..b03e7b4 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,6 +1,6 @@ { "name": "Vendor Bill Editable Totals", - "version": "17.0.1.0.1", + "version": "17.0.1.0.2", "summary": "Enable direct editing of tax excluded and tax included amounts on vendor bill lines with automatic unit price recalculation", "description": """ Vendor Bill Editable Totals diff --git a/models/__pycache__/account_move_line.cpython-312.pyc b/models/__pycache__/account_move_line.cpython-312.pyc index 83ef389..d9c8af6 100644 Binary files a/models/__pycache__/account_move_line.cpython-312.pyc and b/models/__pycache__/account_move_line.cpython-312.pyc differ diff --git a/models/account_move_line.py b/models/account_move_line.py index b776a8e..b80a289 100644 --- a/models/account_move_line.py +++ b/models/account_move_line.py @@ -11,7 +11,7 @@ class AccountMoveLine(models.Model): # Override price_unit to use more decimal places price_unit = fields.Float( string='Unit Price', - digits=(16, 6), # Use 6 decimal places instead of the default 2 + digits=(16, 10), # Use 10 decimal places for maximum precision ) @api.onchange('price_subtotal') @@ -38,7 +38,7 @@ class AccountMoveLine(models.Model): # Formula: price_unit = price_subtotal / quantity new_price_unit = line.price_subtotal / line.quantity - # Set the price_unit - now with 6 decimal precision + # Set the price_unit - now with 10 decimal precision line.price_unit = new_price_unit @api.onchange('price_total')