Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
6848 Weergaven

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
Annuleer
Beste antwoord

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


slug = fields.Char(size=50)
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
mei 21
18847
1
mei 23
2357
3
mrt. 20
42848
0
mrt. 15
4184
1
feb. 23
7922