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

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!!

Аватар
Відмінити
Найкраща відповідь

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


slug = fields.Char(size=50)
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
2
трав. 21
18851
1
трав. 23
2357
Time field in odoo Вирішено
3
бер. 20
42852
0
бер. 15
4194
1
лют. 23
7934