Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
hi to all I want to create a new field type "selection". there is the same example in the stock module product is the category selection list,, how to do?? Thanks
Syntax for creating selection field is
selection(values, string, ...)
values: list of values (key-label tuples) or function returning such a list
For creating dynamic values in the selection. You can add a function like :
then you can define this function as:
def _get_selection(self, cr, uid, context=None): """ Your logic to get the values """ return[(key1,value1),(key2,value2)]
Hope this helps !
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/1/13, 1:19 PM|
|Seen: 1151 times|
|Last updated: 3/16/15, 8:10 AM|