diff --git a/addons/account/account.py b/addons/account/account.py
index 86d7ac16c68..f218e5b5bd7 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -451,8 +451,9 @@ class account_journal(osv.osv):
'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."),
'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account'),
'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account'),
- 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal."),
+ 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal. This is used in fiscal year closing."),
'update_posted': fields.boolean('Allow Cancelling Entries'),
+ 'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is cheked, the system will try to group the accouting lines when generating them from invoices."),
'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True),
'user_id': fields.many2one('res.users', 'User', help="The responsible user of this journal"),
'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'),
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py
index f32d150906d..4dbc8819893 100644
--- a/addons/account/account_move_line.py
+++ b/addons/account/account_move_line.py
@@ -61,6 +61,8 @@ class account_move_line(osv.osv):
def create_analytic_lines(self, cr, uid, ids, context={}):
for obj_line in self.browse(cr, uid, ids, context):
if obj_line.analytic_account_id:
+ if not obj_line.journal_id.analytic_journal_id:
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name,))
amt = (obj_line.credit or 0.0) - (obj_line.debit or 0.0)
vals_lines={
'name': obj_line.name,
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 02ad8648b95..b471343863b 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -267,6 +267,8 @@
+
+
diff --git a/addons/account/invoice.py b/addons/account/invoice.py
index 39e03c710ad..606b8b00f50 100644
--- a/addons/account/invoice.py
+++ b/addons/account/invoice.py
@@ -68,7 +68,7 @@ class account_invoice(osv.osv):
tt = type2journal.get(type_inv, 'sale')
result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context)
if not result:
- raise osv.except_osv(_('No Analytic Journal !'),("You have to define an analytic journal of type '%s' !") % (tt,))
+ raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal of type '%s' !") % (tt,))
return result[0]
def _get_type(self, cr, uid, context={}):
@@ -448,7 +448,7 @@ class account_invoice(osv.osv):
ait_obj = self.pool.get('account.invoice.tax')
cur_obj = self.pool.get('res.currency')
acc_obj = self.pool.get('account.account')
- self.button_compute(cr, uid, ids, context={}, set_total=True)
+ self.button_compute(cr, uid, ids, context={}, set_total=False)
for inv in self.browse(cr, uid, ids):
if inv.move_id:
continue
@@ -598,14 +598,34 @@ class account_invoice(osv.osv):
date = inv.date_invoice or time.strftime('%Y-%m-%d')
part = inv.partner_id.id
+
line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})) ,iml)
+ if inv.journal_id.group_invoice_lines:
+ line2 = {}
+ for x, y, l in line:
+ tmp = str(l['account_id'])
+ tmp += '-'+str('tax_code_id' in l and l['tax_code_id'] or "False")
+ tmp += '-'+str('product_id' in l and l['product_id'] or "False")
+ tmp += '-'+str('analytic_account_id' in l and l['analytic_account_id'] or "False")
+
+ if tmp in line2:
+ am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit'])
+ line2[tmp]['debit'] = (am > 0) and am or 0.0
+ line2[tmp]['credit'] = (am < 0) and -am or 0.0
+ line2[tmp]['tax_amount'] += l['tax_amount']
+ line2[tmp]['analytic_lines'] += l['analytic_lines']
+ else:
+ line2[tmp] = l
+ line = []
+ for key, val in line2.items():
+ line.append((0,0,val))
+
journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']})
journal = self.pool.get('account.journal').browse(cr, uid, journal_id)
if journal.centralisation:
raise osv.except_osv(_('UserError'),
_('Can not create invoice move on centralized journal'))
-
move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date}
period_id=inv.period_id and inv.period_id.id or False
if not period_id:
diff --git a/addons/account_payment/payment_report.xml b/addons/account_payment/payment_report.xml
index 0f39148f719..699207e1733 100644
--- a/addons/account_payment/payment_report.xml
+++ b/addons/account_payment/payment_report.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/addons/account_payment/report/payment_order.py b/addons/account_payment/report/payment_order.py
index f3e9b612d62..ee4dcefed5c 100644
--- a/addons/account_payment/report/payment_order.py
+++ b/addons/account_payment/report/payment_order.py
@@ -31,4 +31,4 @@ class payment_order(report_sxw.rml_parse):
'time': time,
})
-report_sxw.report_sxw('report.payment.order', 'payement.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order,header=False)
\ No newline at end of file
+report_sxw.report_sxw('report.payment.order', 'payment.order', 'addons/account_payment/report/payment_order.rml', parser=payment_order,header=False)
\ No newline at end of file
diff --git a/addons/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py
index 867711e5fe4..dacd296cb85 100755
--- a/addons/account_voucher/__terp__.py
+++ b/addons/account_voucher/__terp__.py
@@ -43,6 +43,7 @@ Basic Accounting, plus new things which available are:
],
"update_xml" : [
+ "security/ir.model.access.csv",
"account_voucher_sequence.xml",
"account_view.xml",
"account_report.xml",
diff --git a/addons/account_voucher/security/ir.model.access.csv b/addons/account_voucher/security/ir.model.access.csv
new file mode 100644
index 00000000000..b4203be5416
--- /dev/null
+++ b/addons/account_voucher/security/ir.model.access.csv
@@ -0,0 +1,6 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_voucher_user","account.voucher","model_account_voucher","account.group_account_user",1,0,0,0
+"access_account_voucher_line_user","account.voucher.line","model_account_voucher_line","account.group_account_user",1,0,0,0
+"access_account_voucher_manager","account.voucher","model_account_voucher","account.group_account_manager",1,1,1,1
+"access_account_voucher_line_manager","account.voucher.line","model_account_voucher_line","account.group_account_manager",1,1,1,1
+
diff --git a/addons/auction/report/huissier.py b/addons/auction/report/huissier.py
index c97f0569e0f..9afe67834c1 100644
--- a/addons/auction/report/huissier.py
+++ b/addons/auction/report/huissier.py
@@ -25,9 +25,8 @@ from osv.osv import osv, orm
from report.interface import report_rml
#FIXME: use the one from tools and delete the one from report
from report.int_to_text import int_to_text
-
-def toxml(val):
- return val.replace('&', '&').replace('<','<').replace('>','>').decode('utf-8').encode('latin1', 'replace')
+from tools import to_xml as toxml
+from tools import ustr
class report_custom(report_rml):
def __init__(self, name, table, tmpl, xsl):
@@ -38,7 +37,7 @@ class report_custom(report_rml):
lots = pool.get('auction.lots').browse(cr, uid, ids)
auction = lots[0].auction_id
- xml = '''
+ xml = '''
%s
@@ -49,7 +48,7 @@ class report_custom(report_rml):
for l in lots:
# l['id_cont'] = str(i)
if l['obj_price']==0:
- price_french = 'retir�'
+ price_french = u'retiré'
else:
price_french = int_to_text(int(l['obj_price'] or 0.0))+' eur'
i+=1
@@ -59,10 +58,9 @@ class report_custom(report_rml):
%s
%s
%s
- ''' % (i, l['obj_num'], toxml(l['name']), price_french, str(l['obj_price'] or '/'))
+ ''' % (i, l['obj_num'], ustr(toxml(l['name'])), ustr(price_french), ustr(l['obj_price'] or '/'))
xml += ''
-# file('/tmp/terp.xml','wb+').write(xml)
return xml
report_custom('report.flagey.huissier', 'auction.lots', '', 'addons/auction/report/huissier.xsl')
diff --git a/addons/base_contact/base_contact.py b/addons/base_contact/base_contact.py
index 289b0b48dc7..943949cff31 100644
--- a/addons/base_contact/base_contact.py
+++ b/addons/base_contact/base_contact.py
@@ -111,13 +111,13 @@ class res_partner_job(osv.osv):
return super(res_partner_job,self).search(cr, user, args, offset, limit, order, context, count)
_name = 'res.partner.job'
- _description ='Contact Job Title'
+ _description ='Contact Partner Function'
_order = 'sequence_contact'
_columns = {
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
'address_id':fields.many2one('res.partner.address','Address'),
'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
- 'function_id': fields.many2one('res.partner.function','Job Title'),
+ 'function_id': fields.many2one('res.partner.function','Partner Function'),
'sequence_contact':fields.integer('Sequence',help='Order of importance of this address in the list of addresses of the linked contact'),
'sequence_partner':fields.integer('Sequence',help='Order of importance of this job title in the list of job title of the linked partner'),
'email': fields.char('E-Mail', size=240),
diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py
index ef4a0c3c515..101043b498c 100644
--- a/addons/base_module_quality/base_module_quality.py
+++ b/addons/base_module_quality/base_module_quality.py
@@ -26,34 +26,51 @@ class abstract_quality_check(object):
This Class provide...
'''
- #This float have to store the rating of the module.
- #Used to compute the final score (average of all scores).
- score = 0.0
-
- #This char have to store the result.
- #Used to display the result of the test.
- result = ""
-
- #This char have to store the result with more details.
- #Used to provide more details if necessary.
- result_details = ""
-
- #This bool defines if the test can be run only if the module is installed.
- #True => the module have to be installed.
- #False => the module can be uninstalled.
- bool_installed_only = True
+# #This float have to store the rating of the module.
+# #Used to compute the final score (average of all scores).
+# score = 0.0
+#
+# #This char have to store the result.
+# #Used to display the result of the test.
+# result = ""
+#
+# #This char have to store the result with more details.
+# #Used to provide more details if necessary.
+# result_details = ""
+#
+# #This bool defines if the test can be run only if the module is installed.
+# #True => the module have to be installed.
+# #False => the module can be uninstalled.
+# bool_installed_only = True
def __init__(self):
'''
this method should initialize the var
'''
- raise 'Not Implemented'
+ #This float have to store the rating of the module.
+ #Used to compute the final score (average of all scores).
+ self.score = 0.0
+
+ #This char have to store the result.
+ #Used to display the result of the test.
+ self.result = ""
+
+ #This char have to store the result with more details.
+ #Used to provide more details if necessary.
+ self.result_details = ""
+
+ #This bool defines if the test can be run only if the module is installed.
+ #True => the module have to be installed.
+ #False => the module can be uninstalled.
+ self.bool_installed_only = True
+
+# raise 'Not Implemented'
def run_test(self, cr, uid, module_path=""):
'''
this method should do the test and fill the score, result and result_details var
'''
- raise 'Not Implemented'
+# raise 'Not Implemented'
def get_objects(self, cr, uid, module):
# This function returns all object of the given module..
@@ -77,5 +94,30 @@ class abstract_quality_check(object):
result_ids[obj] = ids
return result_ids
+ def format_table(self, test='', header=[], data_list=[]):
+ res_format = {}
+ if test=='method':
+ detail = ""
+ detail += "\n===Method Test===\n"
+ detail += ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ') % (header[0].ljust(40), header[1].ljust(16), header[2].ljust(20), header[3].ljust(16))
+ for res in data_list[1][0]:
+ detail += ('\n|-\n| %s \n| %s \n| %s \n| %s ') % (res, data_list[1][0][res][0], data_list[1][0][res][1], data_list[1][0][res][2])
+ res_format['summary'] = [data_list[0][0]]
+ res_format['detail'] = [detail + '\n|}']
+ elif test=='pylint':
+ res_format['summary'] = data_list[0]
+ res_format['detail'] = data_list[1]
+ elif test=='speed':
+ detail = ""
+ detail += "\n===Speed Test===\n"
+ detail += ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s') % (header[0].ljust(40), header[1].ljust(10), header[2].ljust(10), header[3].ljust(10), header[4].ljust(10), header[5].ljust(20))
+ for data in data_list[1]:
+ detail += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (data[0], data[1], data[2], data[3], data[4], data[5])
+ res_format['summary'] = data_list[0]
+ res_format['detail'] = [detail + '\n|}\n']
+ return res_format
+
+
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml
index b49c17667a7..f85c19ab6f7 100644
--- a/addons/base_module_quality/base_module_quality_wizard.xml
+++ b/addons/base_module_quality/base_module_quality_wizard.xml
@@ -9,8 +9,20 @@
form
diff --git a/addons/base_module_quality/method_test/method_test.py b/addons/base_module_quality/method_test/method_test.py
index 0ef59cc2b29..b2015723dcb 100644
--- a/addons/base_module_quality/method_test/method_test.py
+++ b/addons/base_module_quality/method_test/method_test.py
@@ -30,12 +30,13 @@ import pooler
class quality_test(base_module_quality.abstract_quality_check):
def __init__(self):
- self.result = """
-===Method Test===:
-
-This test checks if the module classes are raising exception when calling basic methods or no.
-
-"""
+ super(quality_test, self).__init__()
+# self.result = """
+#===Method Test===:
+#
+#This test checks if the module classes are raising exception when calling basic methods or no.
+#
+#"""
self.bool_installed_only = True
return None
@@ -46,7 +47,6 @@ This test checks if the module classes are raising exception when calling basic
result = {}
ok_count = 0
ex_count = 0
-
for obj in obj_list:
temp = []
try:
@@ -71,13 +71,18 @@ This test checks if the module classes are raising exception when calling basic
temp.append('Exception')
ex_count += 1
result[obj] = temp
- self.result += ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ') % ('Object Name'.ljust(40), 'search()'.ljust(16), 'fields_view_get()'.ljust(20), 'read()'.ljust(16))
-
- for res in result:
- self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s ') % (res, result[res][0],result[res][1], result[res][2])
-
- self.result += '\n|}'
+# self.result += ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-16s \n! %-20s \n! %-16s ') % ('Object Name'.ljust(40), 'search()'.ljust(16), 'fields_view_get()'.ljust(20), 'read()'.ljust(16))
+ header_list = ['Object Name', 'search()', 'fields_view_get', 'read']
+# for res in result:
+# self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s ') % (res, result[res][0],result[res][1], result[res][2])
+# self.result += '\n|}'
self.score = (ok_count + ex_count) and float(ok_count)/float(ok_count + ex_count) or 0.0
+ summary = """\n ===Method Test===:
+
+This test checks if the module classes are raising exception when calling basic methods or no.
+
+""" + "Score: " + str(self.score) + "/10\n"
+ self.result = self.format_table(test='method', header=header_list, data_list=[[summary],[result]])
return None
diff --git a/addons/base_module_quality/pylint_test/pylint_test.py b/addons/base_module_quality/pylint_test/pylint_test.py
index bc05b5fc850..5bf240346d1 100644
--- a/addons/base_module_quality/pylint_test/pylint_test.py
+++ b/addons/base_module_quality/pylint_test/pylint_test.py
@@ -30,12 +30,13 @@ from base_module_quality import base_module_quality
class quality_test(base_module_quality.abstract_quality_check):
def __init__(self):
- self.result = """
-===Pylint Test===:
-
- This test checks if the module satisfy the current coding standard used by OpenERP.
-
-"""
+ super(quality_test, self).__init__()
+# self.result = """
+#===Pylint Test===:
+#
+# This test checks if the module satisfy the current coding standard used by OpenERP.
+#
+#"""
self.bool_installed_only = False
return None
@@ -50,6 +51,8 @@ class quality_test(base_module_quality.abstract_quality_check):
n = 0
score = 0.0
+ detail = ""
+ detail = "\n===Pylint Test===\n"
for file in list_files:
if file.split('.')[-1] == 'py' and not file.endswith('__init__.py') and not file.endswith('__terp__.py'):
file_path = os.path.join(module_path, file)
@@ -64,13 +67,21 @@ class quality_test(base_module_quality.abstract_quality_check):
try:
score += float(res[leftchar+1:rightchar])
- self.result += file + ": " + res[leftchar+1:rightchar] + "/10\n"
+# self.result += file + ": " + res[leftchar+1:rightchar] + "/10\n"
+ detail += file + ": " + res[leftchar+1:rightchar] + "/10\n"
except:
score += 0
- self.result += file + ": Unable to parse the result. Check the details.\n"
-
+# self.result += file + ": Unable to parse the result. Check the details.\n"
+ detail += file + ": Unable to parse the result. Check the details.\n"
self.result_details += res
self.score = n and score / n or score
+ summary ="""
+===Pylint Test===:
+
+ This test checks if the module satisfy the current coding standard used by OpenERP.
+
+""" + "Score: " + str(self.score) + "/10\n"
+ self.result = self.format_table(test='pylint', data_list=[[summary],[detail]])
return None
diff --git a/addons/base_module_quality/speed_test/speed_test.py b/addons/base_module_quality/speed_test/speed_test.py
index 55c05e594b9..5a9176e4946 100644
--- a/addons/base_module_quality/speed_test/speed_test.py
+++ b/addons/base_module_quality/speed_test/speed_test.py
@@ -34,74 +34,75 @@ from base_module_quality import base_module_quality
class quality_test(base_module_quality.abstract_quality_check):
def __init__(self):
- self.result = """
-===Speed Test===:
-
-This test checks the speed of the module.
-
-"""
+ super(quality_test, self).__init__()
+# self.result = """
+#===Speed Test===:
+#
+#This test checks the speed of the module.
+#
+#"""
self.bool_installed_only = True
return None
-
def run_test(self, cr, uid, module_path):
pool = pooler.get_pool(cr.dbname)
module_name = module_path.split('/')[-1]
- self.result+=('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s') % ('Object Name'.ljust(40), 'Size (S)'.ljust(10), '1'.ljust(10), 'S/2'.ljust(10), 'S'.ljust(10), 'Complexity'.ljust(20))
+# self.result+=('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-10s \n! %-10s \n! %-10s \n! %-10s \n! %-20s') % ('Object Name'.ljust(40), 'Size-Number of Records (S)'.ljust(10), '1'.ljust(10), 'S/2'.ljust(10), 'S'.ljust(10), 'Complexity using query'.ljust(20))
+ header_list = ['Object Name', 'Size-Number of Records (S)', '1', 'S/2', 'S', 'Complexity using query']
obj_list = self.get_objects(cr, uid, module_name)
obj_counter = 0
score = 0
obj_ids = self.get_ids(cr, uid, obj_list)
+ detail = ""
+ list1 = []
for obj in obj_ids:
obj_counter += 1
ids = obj_ids[obj]
ids = ids[:100]
size = len(ids)
if size:
- c1 = time.time()
+ c1 = cr.count
+
pool.get(obj).read(cr, uid, ids[0])
- c2 = time.time()
- base_time = c2 - c1
- c1 = time.time()
+ pool.get(obj).read(cr, uid, ids[0])
+ code_base_complexity = cr.count - c1
+
pool.get(obj).read(cr, uid, ids[:size/2])
- c2 = time.time()
- halfsize_time = c2 - c1
- c1 = time.time()
+ pool.get(obj).read(cr, uid, ids[:size/2])
+ code_half_complexity = cr.count - c1
+
pool.get(obj).read(cr, uid, ids)
- c2 = time.time()
- size_time = c2 - c1
+ pool.get(obj).read(cr, uid, ids)
+ code_size_complexity = cr.count - c1
+
if size < 5:
self.score += -2
- self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, base_time, halfsize_time, size_time, "Warning! Not enough demo data")
+# self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, code_base_complexity, code_half_complexity, code_size_complexity, "Warning! Not enough demo data")
+ list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, "Warning! Not enough demo data"]
+ list1.append(list)
else:
- tolerated_margin = 5/100
- complexity = "not recognized"
- if min(size_time,base_time,halfsize_time) != base_time:
+ if code_size_complexity <= (code_base_complexity + size):
complexity = "O(1)"
- score += 10
-
+ score = 10
else:
- k1 = (halfsize_time - base_time)*1000 / ((size/2) - 1)
- k2 = (size_time - base_time)*1000 / ((size) - 1)
- tmp = k1 * tolerated_margin
- if (k1 - tmp) < k2 and k2 < (k1 + tmp):
- complexity = "O(n)"
- if round(tmp) == 0:
- complexity = "O(1)"
- score += 10
- else:
- score += 5
- else:
- complexity = "O(n²) or worst"
- score += 0
-
- self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, base_time, halfsize_time, size_time, complexity)
+ complexity = "O(n) or worst"
+ score = 0
+# self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, code_base_complexity, code_half_complexity, code_size_complexity, complexity)
+ list = [obj, size, code_base_complexity, code_half_complexity, code_size_complexity, complexity]
+ list1.append(list)
else:
score += -5
- self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, "", "", "", "Warning! Object has no demo data")
-
-
- self.result += '\n|}\n'
+# self.result += ('\n|-\n| %s \n| %s \n| %s \n| %s \n| %s \n| %s ') % (obj, size, "", "", "", "Warning! Object has no demo data")
+ list = [obj, size, "", "", "", "Warning! Object has no demo data"]
+ list1.append(list)
+# self.result += '\n|}\n'
self.score = obj_counter and score/obj_counter or 0.0
+ summary = """
+===Speed Test===:
+
+ This test checks the speed of the module.
+
+"""+ "Score: " + str(self.score) + "/10\n"
+ self.result = self.format_table(test='speed', header=header_list, data_list=[[summary],list1])
return None
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_quality/wizard/module_quality_check.py b/addons/base_module_quality/wizard/module_quality_check.py
index e029a94b137..48a04f8f921 100644
--- a/addons/base_module_quality/wizard/module_quality_check.py
+++ b/addons/base_module_quality/wizard/module_quality_check.py
@@ -56,9 +56,9 @@ class wiz_quality_check(osv.osv_memory):
# general_info = ""
_name = 'wizard.quality.check'
-
def _check(self, cr, uid, data, context={}):
string_ret = ""
+ string_detail = ""
from tools import config
data['ids'] = data.get('module_id', False)
pool = pooler.get_pool(cr.dbname)
@@ -72,7 +72,7 @@ class wiz_quality_check(osv.osv_memory):
if module_data[0].name == 'base':
ad = tools.config['root_path']+'/addons'
module_path = os.path.join(ad, module_data[0].name)
- item2 = 'base_module_quality.'+item+'.'+item
+ item2 = 'base_module_quality.' + item +'.' + item
x = __import__(item2)
x2 = getattr(x, item)
x3 = getattr(x2, item)
@@ -81,9 +81,14 @@ class wiz_quality_check(osv.osv_memory):
val.run_test(cr, uid, str(module_path))
else:
val.result += "The module has to be installed before running this test."
- string_ret += val.result
+ string_ret += val.result['summary'][0]
+ string_detail += val.result['detail'][0]
+ self.string_detail = string_detail
return string_ret
+ def _check_detail(self, cr, uid, data, context={}):
+ return self.string_detail
+
# def _general_info(self, cr, uid, data, context={}):
# return self.general_info
@@ -102,9 +107,12 @@ class wiz_quality_check(osv.osv_memory):
#~ },
_columns = {
'general_info': fields.text('General Info', readonly="1",),
+ 'detail' : fields.text('Detail', readonly="1",),
+ 'verbose_detail' : fields.text('Verbose Detail', readonly="1",)
}
_defaults = {
- 'general_info': _check
+ 'general_info': _check,
+ 'detail': _check_detail
}
wiz_quality_check()
diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py
index 14b0152d532..b24501839bd 100644
--- a/addons/mrp_subproduct/__terp__.py
+++ b/addons/mrp_subproduct/__terp__.py
@@ -37,6 +37,7 @@ With this module:
""",
"demo_xml" : [],
"update_xml" : [
+ "security/ir.model.access.csv",
"mrp_subproduct_view.xml",
],
"active": False,
diff --git a/addons/mrp_subproduct/security/ir.model.access.csv b/addons/mrp_subproduct/security/ir.model.access.csv
new file mode 100644
index 00000000000..3c6547410d4
--- /dev/null
+++ b/addons/mrp_subproduct/security/ir.model.access.csv
@@ -0,0 +1,3 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_mrp_subproduct_user","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_user",1,0,0,0
+"access_mrp_subproduct_manager","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_manager",1,1,1,1
diff --git a/addons/project_gtd/wizard/project_gtd_daily.py b/addons/project_gtd/wizard/project_gtd_daily.py
index ad62ee39a4f..3a87f1bd3ed 100644
--- a/addons/project_gtd/wizard/project_gtd_daily.py
+++ b/addons/project_gtd/wizard/project_gtd_daily.py
@@ -33,7 +33,7 @@ class wiz_timebox_open(wizard.interface):
pool = pooler.get_pool(cr.dbname)
ids = pool.get('project.gtd.timebox').search(cr, uid, [('user_id','=',uid),('type','=',tbtype)])
if not len(ids):
- raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !')
+ raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !' % (tbtype,))
view_type = 'form,tree'
if len(ids) >= 1:
domain = "[('id','in',["+','.join(map(str,ids))+"])]"
diff --git a/addons/wiki/security/ir.model.access.csv b/addons/wiki/security/ir.model.access.csv
index a54122e0231..acb871141ff 100644
--- a/addons/wiki/security/ir.model.access.csv
+++ b/addons/wiki/security/ir.model.access.csv
@@ -3,4 +3,6 @@
"wiki_groups_all","wiki.groups","model_wiki_groups",,1,0,0,0
"wiki_wiki","wiki.wiki","model_wiki_wiki","base.group_user",1,1,1,1
"wiki_groups","wiki.groups","model_wiki_groups","base.group_system",1,1,1,1
+"wiki_groups_link","wiki.groups.link","model_wiki_groups_link","base.group_system",1,1,1,1
"wiki_wiki_history","wiki.wiki.history","model_wiki_wiki_history","base.group_user",1,0,1,0
+"wiki_wizard_wiki_history_show_diff","wizard.wiki.history.show_diff","model_wizard_wiki_history_show_diff","base.group_user",1,1,1,1