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

Hello Friends,

     We can use priority widget in selection field,but I want to use priority widget in many2one field.

     anyone give me suggestion how i use priority widget in many2one field

     thanks in advance

アバター
破棄
最善の回答

in your py file

from openerp import models, fields, api, _
from datetime import datetime
AVAILABLE_PRIORITIES = [
    ('0', 'Very Low'),
    ('1', 'Low'),
    ('2', 'Normal'),
    ('3', 'High'),
    ('4', 'Very High')]

class Attend(models.Model):
    _name="permission.details"

    
    set_priority=fields.Selection(AVAILABLE_PRIORITIES, select=True)

 

in ur xml file

<field name="set_priority" widget="priority"></field>

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 24
2065
3
5月 24
1608
1
7月 23
4513
0
3月 24
3330
1
9月 22
6236