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

Hi Friends ,

  From the Technical Documentation - priority: Not used?
  1. I like to know , they mentioned as Not used . But in existing module it have been used . What is the purpose ?

For example : res_request.py

'priority': fields.selection([('0','Low'),('1','Normal'),('2','High')], 'Priority', states={'waiting':[('readonly',True)],'closed':[('readonly',True)]}, required=True),

Thanks & Regards OMPRAKASH.A

الصورة الرمزية
إهمال
أفضل إجابة

In your example Priority is label of field, not attribute priority!

Just for selection field, second parametr is attribute string (that define label). So if you omit name of parametr in field, then apply predefined order of parametrs.

It's equivalent to:

'priority': fields.selection([('0','Low'),('1','Normal'),('2','High')], string='Priority', states={'waiting':[('readonly',True)],'closed':[('readonly',True)]}, required=True),
الصورة الرمزية
إهمال
الكاتب

Hi wowas , Thanks for immediate reply.Can you please explain this line of code ..'priority':fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'), [ addons/crm/report/crm_lead_report.py] ...In this line Priority describe which property ?

For selection field - predefined order of parametrs: fields.selection(values, string, ...). So first parametr is list of values (key-label tuples), and second is label of field. It's equivalent to: 'priority':fields.selection(values=crm.AVAILABLE_PRIORITIES, string='Priority'),

الكاتب

Hi kvas , Thanks for reply .. From your point i can understand the property .But still i have doubt from < Technical Documentation - priority: Not used? > What they explain ? And once again thank for reply

I think it reserved for future use.

الكاتب

Hi wowas , thank for your reply...

BUT IN WHAT SCENARIO WE SHOULD USE "priority" ATTRIBUTE IN OUR FIELD? PROPER DOCUMENTATION IS NOT AVAILABLE SO CAN ANYONE HELP?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 15
5823
2
مارس 15
9573
2
يوليو 15
11545
3
مايو 25
1568
1
أبريل 25
1174