Odoo Help


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.


How to preserve some files against the updates?

Miguel Fernández
on 2/21/13, 1:00 PM 1,205 views

I made changes in the FormView of res.partner.form and it works like I want. After that, I updated modules from launchpad and the changes was gone!

How can I update modules without loss the changes I made? I must redo it again every time?

I know now that the file XML where is stored the form also can be 'updated' but I'm sure it must be a way to work with no pain.

All the changes I made only add 'attrs' (required and visible) to some fields to make it required or not and visible or not if is_company is true.

attrs="{'invisible': [('is_company','=', True)]}

I don't need add new fields to de form (by now), so I wan't edit source code if I don't need. All changes are made through the web client.

Any comment?

Pablo Manuel Rizzo
On 2/21/13, 2:08 PM

Miguel, you should never change an OpenERP source file, you should develop a custom module which inherits and modify the view.

This post is rather old but a simple valid example: https://simahawk.wordpress.com/2010/10/04/openerp-how-to-add-a-custom-field-to-an-object/

Best regards.

Thank you. I'll try. But I don't changed the source files. I edit the form directly in OpenERP.

Miguel Fernández
on 2/22/13, 5:03 AM

Andreas Brueckl

--Andreas Brueckl--
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 2/22/13, 8:17 AM

If you do not want to write a module for that you can create a new view which inherits the original view.

Here is an example of the XML architecture of a new view if you want to change the field standard_price in product.product:

               <field name="standard_price" position="replace">
                   <field name="standard_price" invisible="1"/>

If when I update modules in OpenERP the view don't reset to default view, maybe it can works for me.

Miguel Fernández
on 2/22/13, 9:16 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

2 follower(s)


Asked: 2/21/13, 1:00 PM
Seen: 1205 times
Last updated: 3/16/15, 8:10 AM