Ehab
Ehab

Reputation: 612

Mechanism of database and new modules in Openerp

I'm so confused about the creation of new modules in OpenERP. I need to know what actually creates the tables in the database, and how to modify them. Is it the classes of the new model where we define the "_columns" dictionary? Is it the view (.xml) file where we define <field name="arch" type="xml">?

Or can I build the tables by myself in the pgAdmin?

It took me so much time yet I couldn't figure out the mechanism of creating the structure of the tables.

I downloaded a sample openerp module and installed it which ran successfully, but whenever I tried to add a new field in the xml file I kept getting the message "Invalid XML for View Architecture".

Your help is highly appreciated.

Upvotes: 2

Views: 126

Answers (1)

Dharmraj
Dharmraj

Reputation: 586

If you want to add a new new field, first you have to define it inside "_columns" dictionary , and than you have to restart the server. Doing so, you will be able to see the new column is added for that class(using pgAdmin). Once your field is created, you can add this field in the xml file, and upgrade the respective module. This will work :)

Upvotes: 1

Related Questions