[FIX] sale: do not lose currency rate precision

Since 857c485175, rates are
not truncated anymore.

The stored rate value on SO, between SO currency and company currency
was not adapted and was still truncated, leading to invalid values
after rates conversion.

See also 5a621cea4c5a16998a3b83890144f81a3880244b where the same solution
was appied to pos orders.

opw-3638199

closes odoo/odoo#152592

X-original-commit: 6291424bd49a55f446f87c09af71fd13a1c13851
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
Victor Feyens
2024-02-05 11:00:15 +00:00
parent 9a091a25b5
commit 3f6decab83
+1 -1
View File
@@ -179,7 +179,7 @@ class SaleOrder(models.Model):
currency_rate = fields.Float(
string="Currency Rate",
compute='_compute_currency_rate',
digits=(12, 6),
digits=0,
store=True, precompute=True)
user_id = fields.Many2one(
comodel_name='res.users',