# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
list_files.append(os.path.join(i, j))
py_list = []
for file_py in list_files:
- if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
+ if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
file_path = os.path.join(module_path, file_py)
py_list.append(file_path)
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
flag = False
self.result_details += '''<html><body><head>%s</head>'''%(self.get_style())
for file_py in list_files:
- if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
+ if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
if not flag:
flag = True
file_path = os.path.join(module_path, file_py)
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# module files calculation (module.py,module_view.xml,etc..)
com_list = ['_unit_test.xml', '.py', '_view.xml', '_workflow.xml' , '_wizard.xml', '_report.xml', '_data.xml', '_demo.xml', '_security.xml', '_sequence.xml', '_graph.xml']
com_list = map(lambda x: module_name + x, com_list)
- main_file = ['__init__.py', '__terp__.py']
+ main_file = ['__init__.py', '__openerp__.py']
com_list.extend(main_file)
module_dict['module'] = filter(lambda x: len(x.split(".")) > 1, module_dict['module'])
score = self.get_score(module_dict['module'], com_list)
# -*- coding: utf-8 -*-
##############################################################################
-#
+#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
score = 1.0
feel_good_factor = 0
feel_bad_factor = 0
- if '__terp__.py' not in list_files:
+ if '__openerp__.py' not in list_files:
self.no_terp = True
- self.result += _("The module does not contain the __terp__.py file")
+ self.result += _("The module does not contain the __openerp__.py file")
return None
result_dict = {}
result_dict1 = {}
- terp_file = os.path.join(module_path,'__terp__.py')
+ terp_file = os.path.join(module_path,'__openerp__.py')
res = eval(tools.file_open(terp_file).read())
terp_keys = ['category', 'name', 'description', 'author', 'website', 'update_xml', 'init_xml', 'depends', 'version', 'active', 'installable', 'demo_xml']
for key in terp_keys:
self.result_details += self.get_result_details(result_dict)
self.result_details += self.get_result_details(result_dict1)
- return [_('__terp__.py file'), score]
+ return [_('__openerp__.pyfile'), score]
def run_test(self, cr, uid, module_path):
terp_score = self.run_test_terp(cr, uid, module_path)
if self.score*100 < self.min_score:
self.message = 'Score is below than minimal score(%s%%)' % self.min_score
if terp_score:
- self.result = self.get_result({'__terp__.py': terp_score})
+ self.result = self.get_result({'__openerp__.py': terp_score})
return None
def get_result(self, dict_terp):