From b6c3279917550032b548f5eb9d3f3cae7b2831ba Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Thu, 5 Mar 2026 18:01:05 +0100 Subject: [PATCH] 05.03.26 --- modules/purchase_trade/purchase.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/purchase_trade/purchase.py b/modules/purchase_trade/purchase.py index 18e949f..fafa9e7 100755 --- a/modules/purchase_trade/purchase.py +++ b/modules/purchase_trade/purchase.py @@ -497,6 +497,16 @@ class Line(metaclass=PoolMeta): help="Add attributes to the variant." ) + attribute_set = fields.Function( + fields.Many2One('product.attribute.set', "Attribute Set"), + 'on_change_with_attribute_set' + ) + + @fields.depends('product') + def on_change_with_attribute_set(self, name=None): + if self.product and self.product.template: + return self.product.template.attribute_set.id + attributes_name = fields.Function( fields.Char("Attributes Name"), 'on_change_with_attributes_name'