Odoo Help

1

Module field comment not changing when I upgrade or replace module

By
Cameron
on 9/23/13, 5:12 AM 1,326 views

Hi I'm in the process of writing my first module, exciting stuff!

Ok its very, very simple - just one field so far.

The problem is the field "Comment" - I change it in the python code but it doesn't change in the PostgreSQL database!

I've tested the module installation, by removing it, deleting it, re-installing it - Does all this and even removes the field from PostgreSQL database.

But when I change the comment in the python code from Sale Type to Sale Packaging Typeand re-install the module - it reverts back to the original value.

I'm lost! any guidance please. - Could it be something to do with "translation"?

The python code before

from osv import osv, fields
class sale_packaging_type_field(osv.osv):
    # This OpenERP object inherits from sale.order
    # to add a new selection field
    _inherit = 'sale.order'
    _columns = {
        'sale_packaging_type' : fields.selection((('a', 'A'), ('b', 'B'), ('c', 'C')), 'Sale Type'),
    }

and after

from osv import osv, fields
class sale_packaging_type_field(osv.osv):
    # This OpenERP object inherits from sale.order
    # to add a new selection field
    _inherit = 'sale.order'
    _columns = {
        'sale_packaging_type' : fields.selection((('a', 'A'), ('b', 'B'), ('c', 'C')), 'Sale Packaging  Type'),
    }
2
Andreas Brueckl
On 9/25/13, 7:48 AM

You have to restart the OpenERP Server after you have changed Python code. And afterwards you have to install/update the module.

Many thanks, it worked. Cheers

Cameron
on 9/25/13, 8:09 PM

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

Question tools

0 follower(s)

Stats

Asked: 9/23/13, 5:12 AM
Seen: 1326 times
Last updated: 1/18/17, 6:42 AM