It is quite simple. There is a rule in openerp that your each object should have one "name" field. If not you should define any field as your name field in "_rec_name".
_name = 'my.object'
_rec_name = 'my_field'
_rec_name: Name of the field in which the name of every resource is stored. Default value: ‘name’. Note: by default, the name_get method simply returns the content of this field.
In short, you just have to either define "name" field or "_rec_name" in your object.
See _rec_name for more information.
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
|Asked: 9/16/14, 12:26 PM|
|Seen: 868 times|
|Last updated: 3/16/15, 8:10 AM|