changeset 83541b28184c in modules/product_classification:default
details:
https://hg.tryton.org/modules/product_classification?cmd=changeset;node=83541b28184c
description:
Prevent assign unknown attributes on Model
by adding __slots__ on PoolMeta
issue8567
review254091002
diffstat:
product.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r 807400472004 -r 83541b28184c product.py
--- a/product.py Mon May 06 15:05:54 2019 +0200
+++ b/product.py Sat Sep 07 23:45:08 2019 +0200
@@ -10,6 +10,7 @@
class ClassificationMixin(DeactivableMixin):
+ __slots__ = ()
name = fields.Char('Name', translate=True, required=True)
selectable = fields.Boolean('Selectable', select=True)
@@ -22,6 +23,7 @@
'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')