Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
6 Відповіді
7523 Переглядів

Hello,

anyone can show me how i can add the attributes of the product in sale order report "qweb", i don't know the name of the fields, i tested already "l.product_id.attribute_value_ids" and "l.product_id.attribute_line_ids" but it's not work

Thank you in advance.

Аватар
Відмінити
Hello,

I don't found your reply for the second time, why ?

Cordialement,
Kd

Le 2 mars 2016 à 17:24, Axel Mendoza <portaltemplate12973@mail.odoo.com> a écrit :

A new question Product attributes in qweb report on Ayuda has been posted. Click here to access the question :

See question

--
Axel Mendoza

Sent by Odoo Inc. using Odoo
Автор

Anyone to help me. :(

Найкраща відповідь
<ul t-foreach="l.product_id.attribute_value_ids" t-as="attrib_value">
    <li t-esc=" '%s: %s' % (attrib_value.attribute_id.name, attrib_value.name)"/>
</ul>

I have not tested but according the model, it should work !

 
Аватар
Відмінити

This one is working fine but, is there a way not to use this for each loop. I think this cost performance in generating report.

I've used your formatting string idea from your <li> for using a loop index as attribute value (using $as_index) which didn't work by default. Thx

Найкраща відповідь

try this:

 <span t-field="l.product_id.attribute_value_ids.name"/>
Аватар
Відмінити
Автор Найкраща відповідь

Thanks Jérémy it's work for values :).


What field i can use for get the name of attributes ?

i have tested attribute_line_ids.name but it not work ?!

Аватар
Відмінити
Автор

I edited my previous post because I could not reply directly to Jérémy, is it normal ?, or may be because I don't have enough Karma ?!

I have updated my answer :)

Автор

Thank you Jérémy it work :), but i can't make subject resolved :(

Related Posts Відповіді Переглядів Дія
4
трав. 23
10696
1
січ. 19
9688
0
жовт. 17
3543
0
лист. 16
2818
0
жовт. 16
5040