changeset ba584669843e in modules/sale:default
details: https://hg.tryton.org/modules/sale?cmd=changeset;node=ba584669843e
description:
Prevent assign unknown attributes on Model
by adding __slots__ on PoolMeta
issue8567
review254091002
diffstat:
sale_reporting.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (45 lines):
diff -r 9fb71a2f5227 -r ba584669843e sale_reporting.py
--- a/sale_reporting.py Sat Sep 07 23:38:20 2019 +0200
+++ b/sale_reporting.py Sat Sep 07 23:45:08 2019 +0200
@@ -265,6 +265,7 @@
class CustomerMixin(object):
+ __slots__ = ()
customer = fields.Many2One('party.party', "Customer")
@classmethod
@@ -301,6 +302,7 @@
class ProductMixin(object):
+ __slots__ = ()
product = fields.Many2One('product.product', "Product")
@classmethod
@@ -344,6 +346,7 @@
class CategoryMixin(object):
+ __slots__ = ()
category = fields.Many2One('product.category', "Category")
@classmethod
@@ -513,7 +516,7 @@
class CountryMixin(object):
-
+ __slots__ = ()
country = fields.Many2One('country.country', "Country")
@classmethod
@@ -570,7 +573,7 @@
class SubdivisionMixin(CountryMixin):
-
+ __slots__ = ()
subdivision = fields.Many2One('country.subdivision', "Subdivision")
@classmethod