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

Create Custom Module from Model

By
Dave Ellison
on 11/25/13, 11:28 AM 1,453 views

Hi,

We have a custom model within our V7 of OpenERP system. It is a model that is linked to the partner screen via a onetomany field within res.partner.

I have created a menu and view for this model, but now need to go a little deeper in terms of what I can do. For instance, I cannot just go to settings>user interface>views and click create new search view. The form defaults to view only and I have no option to create a Search view. Also I need to make a change to order etc, which I understand is only available within the custom module code.

So the question is, can I just generate a module based on an existing custom model? If I create a module and import it, will I lost data with the database table, if the same?

What is the best approach?

Many thanks!

0

Gustavo

--Gustavo--
950
| 2 1 4
Buenos Aires, Argentina
--Gustavo--

Python developer, big fan of sailing

Gustavo
On 11/25/13, 11:44 AM

well... my first advice is never configure OpenERP model with the user interface, if you do so you will run into problems like the one you are describing. Second, configure the OpenERP model with a custom module. In the module you can configure the object model and the views. Adding extra information to the partner form is not a big deal.

Now, what to do with the extra information you already created? Well... first create a backup of the database. Then restore the backup in a new database. Install the new module. Then you have to update the current database with the information you loaded in the restored database. You can do that with a Python script

Hi, thanks for the prompt response! So essentially I need to make a basic module and then I can customise from within the system. But always start off with a custom module? Is there any documents on this process? Also in terms of getting this in as a custom module by restore the backup. Can you go into some more detail? Many thanks!

Dave Ellison
on 11/25/13, 12:00 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: 11/25/13, 11:28 AM
Seen: 1453 times
Last updated: 3/16/15, 8:10 AM