Odoo Help


import init file in open erp

on 11/27/13, 2:14 AM 2,622 views

first i create a module in eclipse using addons-new-PyDevPackage then in allocation i got to file-peydev module then i create a _openerp_.py and i write this code

Created on Nov 27, 2013

'name' : "Allocation",
'version': "1.0",
'author': "abc",
'category': "Tools",
'depends' : ["asset"],
'data': [
             'installable': True,

@author: abc '''

then when i import this in init file like impoort Allocation it shows me error

Description Resource Path Location Type Unresolved import: Allocation __init__.py

how i import?

Post the server log and your __init__.py file.

Gopakumar N G
on 11/27/13, 2:18 AM

when i open _init_py.file and write import Allocation then it shows me error and server log means?

on 11/27/13, 2:26 AM

pleae tell me i really need help about this :(

on 11/27/13, 2:36 AM

Do you have a file named Allocation.py in your module? There is single quote (') missing in your __openerp__.py file's 'demo':[ 'allocation_demo.xml ], After allocation_demo.xml, correct it also.

Gopakumar N G
on 11/27/13, 4:47 AM

yes i have a file allocation.py but i havent code in it

on 11/27/13, 4:53 AM

Ok. There is only one line in your __init__.py file and which is import allocation. Is "allocation.py" is name of your python file? In init file we import the python files we have created in our module.

Gopakumar N G
on 11/27/13, 5:34 AM

Your init file contains import allocation and the file name is allocation.py right? Are the spelling of file allocation is same in init.py? Also let me know the directory structure, is your module is in addons folder?

Gopakumar N G
on 11/27/13, 7:41 AM

yes spellin are correct and when i create modulue in the director of addons the modulue also their in addons folder

on 11/27/13, 11:42 AM

Are you running the server on ubuntu? if yes then what is the error shown in the terminal?

Gopakumar N G
on 11/28/13, 1:43 AM

i am using windows 7

on 11/28/13, 3:08 AM

Check the log file for the error description, the log file is in the server folder of your openerp installation. http://forum.openerp.com/forum/topic24127.html

Gopakumar N G
on 11/28/13, 3:26 AM

is it import Allocation or import allocation that you have written?

on 12/2/13, 7:59 AM

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

0 follower(s)


Asked: 11/27/13, 2:14 AM
Seen: 2622 times
Last updated: 3/16/15, 8:10 AM