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

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)
الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
مايو 21
18714
1
مايو 23
2278
Time field in odoo تم الحل
3
مارس 20
42593
0
مارس 15
4078
1
فبراير 23
7770