コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6738 ビュー

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
5月 21
18713
1
5月 23
2273
3
3月 20
42585
0
3月 15
4077
1
2月 23
7766