Odoo Help

0

Create Custom Module from Model

By
Dave Ellison
on 11/25/13, 11:28 AM 1,748 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--
980
| 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

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: 11/25/13, 11:28 AM
Seen: 1748 times
Last updated: 3/16/15, 8:10 AM