diff --git a/modules/purchase_trade/purchase.py b/modules/purchase_trade/purchase.py index de81f5b..4f9cc46 100755 --- a/modules/purchase_trade/purchase.py +++ b/modules/purchase_trade/purchase.py @@ -509,7 +509,7 @@ class Line(metaclass=PoolMeta): @fields.depends('product') def on_change_with_attribute_set(self, name=None): - if self.product and self.product.template: + if self.product and self.product.template and self.product.template.attribute_set: return self.product.template.attribute_set.id @fields.depends('product', 'attributes')