This commit is contained in:
2026-03-05 18:01:05 +01:00
parent 2b956e6142
commit b6c3279917

View File

@@ -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'