Odoo Help


Table doesn't get created in the postgres db

Amina Khechou
on 5/17/15, 5:44 PM 980 views


I really need your help, i just started working on Odoo , well I have create a module of course's management, i can load my module but the database the table isn't created :s and i don't know why ???

ps: the file __init__.py --> import test.py

the code is : test.py 

from osv import osv,fields


#Classe 1 : filiere


class filiere(osv.osv):

#Le nom de la table dans ODOO

_name ='filiere'

_description ="pour la filiere "

#_columns : ce sont les champs que l'on va créer dans la table filiere

_columns = {

#C'est dans ce champ qu'on enregistrera le code du filiere.

'code' :fields.char('code', size=30, required=True),

'theme' :fields.char('theme', size=30, required=True),

'description' :fields.text('Les informations sur la filiere'),

#On enregistrera ici le nom du module. Ce champ fait la relation avec la table modules qui contient les informations de chaque module.

'module' : fields.many2one('module', 'module', required=True),




#Classe 2: etudiant


class etudiant(osv.osv):

_name ='etudiant'

_description ="pour l'etudiant "

_columns = {

'codeApoge' :fields.char('codeApoge', size=30, required=True),

'nom' :fields.char('nom', size=30, required=True),

'prenom' :fields.char('prenom', size=30, required=True),

'tel' :fields.char('tel', size=30, required=True),

'adresse' :fields.char('adresse', size=30, required=True),

'description' :fields.text('Les informations sur la filiere')




#Classe 3: modules


class module(osv.osv):

_name ='module'

_description ="pour un module "

_columns = {

'nommodule' :fields.char('nommodule', size=30, required=True)



Did the module itself install and without errors? I wouldn't honestly ever name a file 'test.py', since test might be reserved or used for other things. So first try another filename and update your module.

on 5/18/15, 1:57 AM

Atchuthan - Technical Consultant, Sodexis Inc

--Atchuthan - Technical Consultant, Sodexis Inc--
| 5 5 8
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc
On 5/18/15, 2:19 AM

In __init__.py,

You need to add only the filename

i.e. import test

Amina Khechou
On 5/18/15, 10:13 AM

Atchuthan, I know that's what i did i've just made a mistake copying the module name, but in my file it's written import test thanks

Yenthe, i'll try this right now thanks !!  

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.


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

2 follower(s)


Asked: 5/17/15, 5:44 PM
Seen: 980 times
Last updated: 5/18/15, 10:13 AM