mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[FIX] contract: subtotal miscalculated when price_unit displayed with fewer digits than actual value
This commit addresses an issue in the "contract" module where the subtotal was incorrectly calculated when the price_unit field was displayed with fewer digits than its actual value, resulting in discrepancies of a few cents. The change made in this commit is: Adding the digits attribute with the value "Product Price" to the price_unit field, ensuring the proper display of decimal places, leading to accurate subtotal calculations and eliminating cent discrepancies.
This commit is contained in:
@@ -39,6 +39,7 @@ class ContractAbstractContractLine(models.AbstractModel):
|
||||
string="Unit Price",
|
||||
compute="_compute_price_unit",
|
||||
inverse="_inverse_price_unit",
|
||||
digits="Product Price",
|
||||
)
|
||||
price_subtotal = fields.Float(
|
||||
compute="_compute_price_subtotal",
|
||||
|
||||
@@ -14,3 +14,4 @@
|
||||
* Rafael Blasco
|
||||
* Víctor Martínez
|
||||
* Iván Antón <ozono@ozonomultimedia.com>
|
||||
* Eric Antones <eantones@nuobit.com>
|
||||
|
||||
Reference in New Issue
Block a user