Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5306 มุมมอง

I recently took over implementation of an OpenERP installation.

It contains several installs of OpenERP (three versions - each with a test install, a migration install, a development install, a staging install and a production install) and also has many directories containing OpenERP Modules.

I am looking for a specific module but want to avoid the time consuming task of looking in every addons path for each of the 15 different installs of OpenERP.

Is there a way to search the entire filesystem (Ubuntu) for folders that are OpenERP modules and create a sorted list?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

An OpenERP module can be identified by a folder or directory containing the file __openerp__.py

An Ubuntu search for all folders containing that file can be done by running the following command as sudo: (this command also sorts the list by path and outputs the list to a file)

find . -type d -exec test -e "{}/__openerp__.py" ';' -print | sort > modules.txt

You can then open this file in Excel and create a formula to find the last / character in the path and extract just the module name.

=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"/","|",LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))))

Once you have the module name, you can sort again just by this column, and you will have a sorted list of all OpenERP module names on the filesystem together with the paths that locate them.

อวตาร
ละทิ้ง

Probably should be `__init__.py` these days, but it still works.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 25
4553
0
ธ.ค. 24
9697
3
ก.ย. 24
21973
How to activate the Technical Features? แก้ไขแล้ว
5
ธ.ค. 24
53371
4
ก.ค. 24
10821