From 7a88fd91186af8e745466f0206ffea195182108e Mon Sep 17 00:00:00 2001 From: Ahmed Aly Date: Mon, 2 Jul 2018 14:13:30 +0200 Subject: [PATCH] =?UTF-8?q?Feedback=201819:=20ATOF18-000313:=20Rabattverga?= =?UTF-8?q?be=20nicht=20m=C3=B6glich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/custom-addons/dp_custom/models/sale.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 4b9660e8..f2d96ab5 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -521,6 +521,10 @@ class SaleOrderLine(models.Model): precision_digits=precision_digits) != 0: allowed_write = False break + elif val_key in list(vals.keys()) and type(self.__getattribute__(val_key)) is type(self.env['product.uom']): + if self.__getattribute__(val_key).id != vals[val_key]: + allowed_write = False + break elif val_key in list(vals.keys()): allowed_write = False break