İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
7035 Görünümler

I'm trying to use HTML attributes with form fields. What I was trying is to use maxlength attribute with a text field. I tried the followings:


1. <field name="slug" maxlength="50" />
2. <field name="slug" attrs="{'maxlength': '50'}" />


But neither of these tactics are not working. Is it possible to use native HTML attributes like maxlength, size etc with Odoo form fields?

Any help would be appreciable!!

Avatar
Vazgeç
En İyi Yanıt

Fields of type text have a size parameters that can be used in definiton


slug = fields.Char(size=50)
Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 21
19121
1
May 23
2517
3
Mar 20
43207
0
Mar 15
4445
1
Şub 23
8151