← Back to team overview

credativ team mailing list archive

Compilation questions in OpenERP

 

Hi Team,

First of all, I'm more than happy to join this family.
Actually, during the development in OpenERP, I have come across 2
problems these days.

1. I'm using a 3rd party IDE like Eclipse or Pycharm to import the whole
OpenERP folder. After that, I tried to run some files like
project/project.py. But it will end up with the error like "no module
named tools.translate". Does this mean I only need to import the add-on
folder into IDE? But if I do it in that way, it will pop up the error
like "no module named openerp".
Is there any best practice brought up so far that could make the
compilation of py files in Openerp more smoothly?

2. I noticed that in every module, there will be a pyo file matching to
a py file. But even if I delete the pyo file and restart the openerp
service, it will never generate again. It will only be regenerated when
we modify the py file and restart the service.
I have read the code in setup.py and it only has the code
" if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename):
                files.append(os.path.join(root, filename))"
which means if no pyo append, add the pyo file.
So my question is what's the mechanism in openerp against the generating
of pyo file. And is there any way that we could generate the pyo file
instead of restarting the openerp service?

Thanks a lot for attention in advance.

Regards
Zaki
-- 
This message was sent from Launchpad by
zaki1029 (https://launchpad.net/~zaki1029)
to each member of the OpenERP Framework Experts team using the "Contact this
team" link on the OpenERP Framework Experts team page
(https://launchpad.net/~openerp-expert-framework).
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople