Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Optional parameter Fields - Priority

By
omprakash
on 5/30/13, 12:08 PM 1,938 views

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

0

Vasiliy Birukov

--Vasiliy Birukov--
3446
| 6 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 6/3/13, 2:56 AM

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 ?

omprakash
on 6/3/13, 3:43 AM

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'),

kvas
on 6/3/13, 5:48 AM

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

omprakash
on 6/7/13, 1:10 PM

I think it reserved for future use.

Vasiliy Birukov
on 6/8/13, 3:50 AM

Hi wowas , thank for your reply...

omprakash
on 6/8/13, 8:25 AM

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

shanky
on 4/30/14, 6:59 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/30/13, 12:08 PM
Seen: 1938 times
Last updated: 7/10/15, 3:25 AM