diff --git a/modules/purchase/view/purchase_line_form.xml b/modules/purchase/view/purchase_line_form.xml
index 76bc5d0..14df78f 100755
--- a/modules/purchase/view/purchase_line_form.xml
+++ b/modules/purchase/view/purchase_line_form.xml
@@ -13,12 +13,11 @@ this repository contains the full copyright notices and license terms. -->
-
-
-
+
+
@@ -49,6 +48,10 @@ this repository contains the full copyright notices and license terms. -->
+
+
+
+
diff --git a/modules/purchase_trade/purchase.py b/modules/purchase_trade/purchase.py
index fafa9e7..300e436 100755
--- a/modules/purchase_trade/purchase.py
+++ b/modules/purchase_trade/purchase.py
@@ -501,16 +501,28 @@ class Line(metaclass=PoolMeta):
fields.Many2One('product.attribute.set', "Attribute Set"),
'on_change_with_attribute_set'
)
+
+ attributes_name = fields.Function(
+ fields.Char("Attributes Name"),
+ 'on_change_with_attributes_name'
+ )
+
+ att_desc = fields.Function(fields.Char("Attributes"),'get_attributes')
+
+ def get_attributes(self, name):
+ if not self.attributes:
+ return ''
+
+ parts = []
+ for attribute, value in self.attributes.items():
+ parts.append(f"{attribute.name}: {value}")
+
+ return ', '.join(parts)
@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'
- )
@fields.depends('product', 'attributes')
def on_change_with_attributes_name(self, name=None):