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.

0

Why are my column names not updating but the rest is?

By
Yakito
on 1/21/15, 8:17 AM 579 views

Hello,

I have an odd sitation here. I am trying to update my column names, and they are not updating, even though if I modify the contents or add a new one it is working.

For example:

For this column

'gender':fields.selection([('Male','Male'),('Female','Female')],'Gender'),

If I update the fields it works, but for this other column

'father_name': fields.char('Lastname'),

If I change Lastname to Last Name it wont update.

I did update the modules many times and restarted the server but for some reason the names of the columns are not chaning. 

Am I misssing something?

Thanks!


EDIT: This is the code for the function

class student(osv.osv):
    _columns = {
        'student_name': fields.char('Student Name',required=True),
        'name': fields.char('ID Number'),
        'father_name': fields.char('Last Name'),
        'gender':fields.selection([('Male','Male'),('Female','Female')],'Gender'),
        'contact_no':fields.char('e-mail'),
    }
    
    _name = "sim.student"
    _rec_name = 'student_name'

student()

 

 

Can u show ur complete code....

Umashankar Subramani
on 1/21/15, 8:26 AM

Hi, I added the code for the function. Let me know if you need anything else.

Yakito
on 1/21/15, 8:32 AM

Only in one module you have 'father_name': fields.char('Last Name'),?

zbik
on 1/21/15, 9:41 AM

Nop, I even tried changing other columns and the column name stays the same, but the content is updated. I haven't tried changing a column of another class. I will try that now. It should work as it is, right?

Yakito
on 1/21/15, 10:34 AM

it is not related to the field name translation?

zbik
on 1/21/15, 11:47 AM

Nothing seems to work... I will continue investigating :(

Yakito
on 1/21/15, 3:00 PM

Uninstall and re-installation module?

zbik
on 1/21/15, 3:11 PM

That didn't do it either. It is strange that when I create a new field it works fine. I think there is something with the DB not updating. Is there any kind of cache or something I should look into?

Yakito
on 1/21/15, 4:08 PM

Check the name of the field directly in the database, with phppgadmin or by other way

zbik
on 1/21/15, 4:18 PM

PS. after re-install

zbik
on 1/21/15, 4:28 PM

PS1. re-install after previous restart (stop server, verify all active openerp-server processes - kill all if need, start server)

zbik
on 1/21/15, 4:35 PM

I think you are right with the other instances of openerp running at the same time. After a lot of frustration I decided to terminate the OpenErp instance (it is running on AWS) and create a new one and now it works. Maybe there was some other instance of OpenERP running simultaneously causing the trouble? Not sure, but glad it is working now.

Yakito
on 1/21/15, 9:40 PM
0
Ram Peri
On 1/21/15, 7:00 PM

Here is a shrewd guess.

I think your column name has a conflict with an existing column name.

 Try changing the column name, to say MyGender and see if the changes are reflected.

It is for this reason that it is a good idea to prefix all your fields with a standard text, e.g. st_

Thanks for your time Ram, it looks like it had to do with other instances of Odoo running simultaneously

Yakito
on 1/22/15, 7:34 AM
0

Vasanth

--Vasanth--
3458
| 5 3 8
Pondicherry, India
--Vasanth--
Vasanth
On 1/22/15, 12:16 AM

Hi Yakito,

You can use the field string in the xml view by using following ways:

<field name="father_name" string="Last Name"/>,

(or)

<label string="Last Name" for="father_name" />

It may change your new field name...

Thanks, it looks like the error had to do with other instances of Odoo running simultaneously

Yakito
on 1/22/15, 7:35 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: 1/21/15, 8:17 AM
Seen: 579 times
Last updated: 3/16/15, 8:10 AM