تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5059 أدوات العرض

I want to add a custom html attribute (say - download ) to a field in the view

I tried these

<field name="attachment" filename="answer_id" download="answer_id" />

<field name="attachment" filename="answer_id" t-att-download="answer_id" />

but fails. How can achieve this. Thanks in advance

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

You can not directly add html attribute in field view.

you need to create widget and then it used in field view.

Thank you.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 15
4495
1
مارس 15
4418
1
أغسطس 15
9098
0
يونيو 15
3344
1
مارس 15
7400