From 07bb9cac8bad72c7472210ef59d77d4b22a3eb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 15 Mar 2019 16:31:34 +0100 Subject: [PATCH] Remove product_suppliers domain constraint on product As product suppliers can be defined at the product and template level but also using a MatchMixin, it is no more flexible to have a domain using it on the product. It does not hurt the data integrity because if the field is changed the product_supplier field will also be validated (because it depends on it). Also the on_change's ensure a default integrity for the user. issue6799 --- purchase.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/purchase.py b/purchase.py index 28f9e567f3..c1477ec766 100644 --- a/purchase.py +++ b/purchase.py @@ -946,10 +946,7 @@ class PurchaseLine(sequence_ordered(), ModelSQL, ModelView): ondelete='RESTRICT', domain=[ If(Eval('purchase_state').in_(['draft', 'quotation']), - [('purchasable', '=', True), - If(Bool(Eval('product_supplier')), - ('product_suppliers', '=', Eval('product_supplier')), - ())], + [('purchasable', '=', True)], []), ], states={