Skip to Content
Menu
This question has been flagged
1 Reply
1905 Views

odoo10 can generate pyc,odoo12 can't.

Generate pyc to speed up the operation.

Docker and Linux run odoo12, run odoo12 how to automatically generate pyc
It can improve the running speed

Avatar
Discard
Best Answer

To generate .pyc you need to restart odoo service. Don't forget to add the locations of addons and custom addons to the configuration.

Avatar
Discard
Author

If I restart odoo multiple times in wind10 or docker in centos, pyc cannot be generated

do you get that as an error and where? what files do you want to compile to pyc, what module, is it standard or custom?

Author

It is standard,All files of odoo12.

Pyc is generated automatically by odoo10, but not by all odoo12 files

haven't tried odoo12 but I know that it uses python 3 and not 2.7 like odoo 10 so maybe you're not running it with the correct python. Windows don't have python installed so you have to do manually. older linux distros have the default python 2.7 (the one that is run by python command), on my home linux mint pc I need to run with command python3. just run python --version in cmd or terminal to see the default python version.

Author

Install python3.5 on docker and python2.7 and python3.5 on Windows.

It's certainly not the python version, because odoo12 works, except that pyc is not generated

then the only other thing what I can think of is the directory/file permissions and owners on linux. You have configured the addons-path? Sry that I can't be more help. good luck.

Related Posts Replies Views Activity
2
Dec 23
11994
0
Oct 23
33
3
Oct 23
787
1
Oct 23
569
1
Aug 23
979