hello,
I have created a new module and for some reason i am unable to change the form title as shown in the figure Screenshot.
Can anyone help me with this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
hello,
I have created a new module and for some reason i am unable to change the form title as shown in the figure Screenshot.
Can anyone help me with this?
Hello Zadeek,
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".
Syntax:
class mail_alias(osv.Model):
_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.
thanks that helped but if i wanted a string like in salesorder so001 how can i acheive that..
Here is your answer to generate sequence: www.odoo.com/forum/help-1/question/how-to-implement-sequences-8830.
Thanks that helped a lot.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Either use rec_name or set name_get function for the model.
see:- https://www.youtube.com/watch?v=-1r3WSwtqxQ