Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
13609 Prikazi

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

Avatar
Opusti
Best Answer

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>

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jul. 24
2112
3
maj 24
1618
1
jul. 23
4548
0
mar. 24
3337
1
sep. 22
6263