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.

1

Custom field gets removed on module upgrade? [SOLVED]

By
dirtyHandsPHP
on 6/12/14, 7:15 AM 960 views

We did following two actions :

1. Added new custom field 'x_pan_no' in employee form.

2. installed new module called 'Resource' from settings section.

To check the installed module's effects we upgraded the module. It worked well but removed custom field from xml file although it's there in 'hr_employee' table.

Can anyone explain the reason and how i can control it??

 

 

3

gunnar

--gunnar--
1153
| 6 7 8
Germany
--gunnar--

born

gunnar
On 6/12/14, 8:09 AM

I think this happens when you use either the nightly.openerp sources and apt-get update for a local installation. Or with any SaaS online version. Why? the code of your source does not include your added field and your code (which is altered now compared to the source) gets overridden with any update.

You can avoid this with two aproaches

  1. you can write a separate module for whatever how small change (as such an added field). This will be your own custom module which will not be touched by an update.
  2. you do your local installation from launchpad/github sources. When you update such an installation either git or bzr will check which code is newer (the one on the source's side or your local one) and will not change any local code which might be newer then the code from the source (and your new field will be newer then the sources). So it will not be touched

This is my understanding of this matter in theory.  I never had to update my OE 7 yet because it is pretty new, so I have no hands-on experience. If anyone knows it better then me ... I assume my post will be corrected shortly.

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

2 follower(s)

Stats

Asked: 6/12/14, 7:15 AM
Seen: 960 times
Last updated: 3/16/15, 8:10 AM