From 16fe74b0b467d3b57eebd65c15e456af3039a954 Mon Sep 17 00:00:00 2001 From: jbeficent Date: Mon, 24 Oct 2016 19:10:26 +0200 Subject: [PATCH] when the product changes reset the procurement uom --- stock_orderpoint_uom/models/stock_warehouse_orderpoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py b/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py index 5cb40275d..3cefdfcba 100644 --- a/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py +++ b/stock_orderpoint_uom/models/stock_warehouse_orderpoint.py @@ -16,4 +16,5 @@ class StockWarehouseOrderpoint(models.Model): @api.onchange('product_id') def onchange_product_id(self): for rec in self: - rec.procure_uom_id = rec.product_id.uom_id + if rec.procure_uom_id: + rec.procure_uom_id = False