From 63deb9e352144aa676b8e553bc986e65fd4afdb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 7 Sep 2019 23:45:08 +0200 Subject: [PATCH] Prevent assign unknown attributes on Model by adding __slots__ on PoolMeta issue8567 review254091002 --- product.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product.py b/product.py index 5a38a1488e..fe7c5a606d 100644 --- a/product.py +++ b/product.py @@ -10,6 +10,7 @@ __all__ = ['ClassificationMixin', 'classification_tree', class ClassificationMixin(DeactivableMixin): + __slots__ = () name = fields.Char('Name', translate=True, required=True) selectable = fields.Boolean('Selectable', select=True) @@ -22,6 +23,7 @@ def classification_tree(name): 'Return a ClassificationMixin with tree structure' class ClassificationTreeMixin(tree(separator=' / '), ClassificationMixin): + __slots__ = () parent = fields.Many2One(name, 'Parent', select=True) childs = fields.One2Many(name, 'parent', 'Children')