From fea667a2433dfc2387daa7051989e840d30e18e0 Mon Sep 17 00:00:00 2001 From: amoyaux Date: Wed, 11 Oct 2017 14:59:47 +0200 Subject: [PATCH] [FIX] account_invoice: Wrong default uom The UOM by default should be the purchase UOM opw-775105 --- addons/account/models/account_invoice.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 8d73a1f5c85..06fba95630c 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -1310,6 +1310,9 @@ class AccountInvoiceLine(models.Model): self.price_unit = 0.0 domain['uom_id'] = [] else: + # Use the purchase uom by default + self.uom_id = self.product_id.uom_po_id + if part.lang: product = self.product_id.with_context(lang=part.lang) else: