Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
5294 Visualizzazioni

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

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
mar 15
4763
1
mar 15
4654
1
ago 15
9320
0
giu 15
3519
1
mar 15
7650