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
This commit is contained in:
Cédric Krier committed 2019-03-15 16:31:34 +01:00
1 parent 21ed59ded1
commit 07bb9cac8b
1 file changed
+1 -4
+1 -4
View File
@@ -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={