i can get Attribute value like White,Red,Blue ....
with
<strong><span t-esc="', '.join(map(lambda x: x.name, product.product_template_attribute_value_ids))"/></strong>
i also need
Color, Size attribute name ....
how i can in odoo v13 ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
i can get Attribute value like White,Red,Blue ....
with
<strong><span t-esc="', '.join(map(lambda x: x.name, product.product_template_attribute_value_ids))"/></strong>
i also need
Color, Size attribute name ....
how i can in odoo v13 ?
(Pdb) self.product_template_attribute_value_ids
product.template.attribute.value(9, 17, 12)
(Pdb) self.product_template_attribute_value_ids.mapped('name')
['M', 'Rainbow', 'Men']
(Pdb) self.product_template_attribute_value_ids.mapped('attribute_id')
product.attribute(4, 2, 5)
(Pdb) self.product_template_attribute_value_ids.mapped('attribute_id.name')
['Size', 'Color', 'Gender']
(Pdb)
so answer is
<strong><span t-esc="', '.join(prodcut.product_template_attribute_value_ids.mapped('attribute_id.name'))"/></strong>
this one is what i want ... :) thanks Ravi
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
1
nov. 19
|
4539 | |||
|
1
jul. 25
|
3405 | |||
|
0
mai. 23
|
2924 | |||
|
3
mar. 25
|
25958 | |||
|
3
mar. 23
|
12119 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.