From b95affa3ee64717562f274ebfb8e27da40f025f3 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 22 Jan 2019 16:31:43 +0000 Subject: [PATCH] [FIX] sale: taxes and untaxed amount - Create a SO, do not set a partner - Add a product with a tax The untaxes amount as well as the taxes remain 0.0. This is because there is no pricelist, therefore no currency. There is actually no need of rounding explicitly since these are monetary fields which will be rounded automatically. opw-1931796 closes odoo/odoo#30450 --- addons/sale/models/sale.py | 4 ++-- addons/sale/views/sale_views.xml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index 390ab7b91ef..5295f501a91 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -34,8 +34,8 @@ class SaleOrder(models.Model): amount_untaxed += line.price_subtotal amount_tax += line.price_tax order.update({ - 'amount_untaxed': order.pricelist_id.currency_id.round(amount_untaxed), - 'amount_tax': order.pricelist_id.currency_id.round(amount_tax), + 'amount_untaxed': amount_untaxed, + 'amount_tax': amount_tax, 'amount_total': amount_untaxed + amount_tax, }) diff --git a/addons/sale/views/sale_views.xml b/addons/sale/views/sale_views.xml index 79d353c4a85..b1b2877178a 100644 --- a/addons/sale/views/sale_views.xml +++ b/addons/sale/views/sale_views.xml @@ -254,6 +254,7 @@ +