python - How to arrange files in Odoo -
beginner odoo questions. how arrange model files , controller files in respective folders? , have write in init.py file?
currently have models , controllers in root folder of module.
like this
addons\ -->mymodule\ -->views\ -->view.xml -->__init__.py -->__openerp__.py -->models.py -->controllers.py i have tried
addons\ -->models\ -->models.py and import models.py using inside init.py
from models import models but not work
addons\ ->yourmodule\ ->controllers\ ->__init__.py ->controllers.py ->models\ ->__init__.py ->modelname.py ->__init__.py ->__openerp__.py content of init.py in controllers folder:
from . import controllers content of controllers.py in controllers folder:
from openerp import http content of init.py in models folder:
from . import modelname content of init.py in module folder:
from . import controllers . import models content of openerp.py in module folder: list of xml files (instruction)
wiki
Comments
Post a Comment