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

Module field comment not changing when I upgrade or replace module

By
Cameron
on 9/23/13, 5:12 AM 1,119 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

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
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

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

0 follower(s)

Stats

Asked: 9/23/13, 5:12 AM
Seen: 1119 times
Last updated: 3/16/15, 8:10 AM