diff --git a/addons/account/account.py b/addons/account/account.py
index 50b922d723b..5a98c1e10f5 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -130,7 +130,7 @@ class account_payment_term_line(osv.osv):
return True
_constraints = [
- (_check_percent, _('Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% '), ['value_amount']),
+ (_check_percent, 'Percentages for Payment Term Line must be between 0 and 1, Example: 0.02 for 2% ', ['value_amount']),
]
account_payment_term_line()
diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml
index 4d4b0a3022f..a7da472e760 100644
--- a/addons/account/account_invoice_view.xml
+++ b/addons/account/account_invoice_view.xml
@@ -63,7 +63,9 @@
-
+
+
diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml
index 901fe2bc11d..ff957fafab2 100644
--- a/addons/account/account_view.xml
+++ b/addons/account/account_view.xml
@@ -405,7 +405,7 @@
-
account.bank.statement.tree
account.bank.statement
@@ -950,7 +948,6 @@
[('parent_id','=',False)]
-
Chart of Taxes
account.tax.code
@@ -1417,6 +1414,10 @@
+
+
+
+
@@ -2571,7 +2572,6 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
-
account.bank.statement.form
account.bank.statement
@@ -2586,7 +2586,6 @@ action = self.pool.get('res.config').next(cr, uid, [], context)
-
diff --git a/addons/account_analytic_analysis/security/ir.model.access.csv b/addons/account_analytic_analysis/security/ir.model.access.csv
index 80b9f37db1f..fa12109c5e1 100644
--- a/addons/account_analytic_analysis/security/ir.model.access.csv
+++ b/addons/account_analytic_analysis/security/ir.model.access.csv
@@ -1,3 +1,3 @@
-id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_account_analytic_analysis_summary_user,account_analytic_analysis.summary.user,model_account_analytic_analysis_summary_user,account.group_account_manager,1,0,0,0
-access_account_analytic_analysis_summary_month,account_analytic_analysis.summary.month,model_account_analytic_analysis_summary_month,account.group_account_manager,1,0,0,0
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_account_analytic_analysis_summary_user","account_analytic_analysis.summary.user","model_account_analytic_analysis_summary_user","account.group_account_manager",1,0,0,0
+"access_account_analytic_analysis_summary_month","account_analytic_analysis.summary.month","model_account_analytic_analysis_summary_month","account.group_account_manager",1,0,0,0
diff --git a/addons/base_action_rule/base_action_rule.py b/addons/base_action_rule/base_action_rule.py
index 9a2d720cc1a..3e2daa586c1 100644
--- a/addons/base_action_rule/base_action_rule.py
+++ b/addons/base_action_rule/base_action_rule.py
@@ -24,7 +24,7 @@ from tools.translate import _
from datetime import datetime
from datetime import timedelta
from tools.safe_eval import safe_eval
-import pooler
+import pooler
import re
import time
import tools
@@ -34,7 +34,7 @@ class base_action_rule(osv.osv):
_name = 'base.action.rule'
_description = 'Action Rules'
-
+
def _state_get(self, cr, uid, context={}):
""" Get State
@param self: The object pointer
@@ -50,7 +50,7 @@ class base_action_rule(osv.osv):
@param uid: the current user’s ID for security checks,
@param context: A standard dictionary for contextual values """
return [('', '')]
-
+
def priority_get(self, cr, uid, context={}):
""" Get Priority
@param self: The object pointer
@@ -60,57 +60,57 @@ class base_action_rule(osv.osv):
return [('', '')]
_columns = {
- 'name': fields.char('Rule Name', size=64, required=True),
- 'model_id': fields.many2one('ir.model', 'Object', required=True),
- 'create_date': fields.datetime('Create Date', readonly=1),
+ 'name': fields.char('Rule Name', size=64, required=True),
+ 'model_id': fields.many2one('ir.model', 'Object', required=True),
+ 'create_date': fields.datetime('Create Date', readonly=1),
'active': fields.boolean('Active', help="If the active field is set to False,\
- it will allow you to hide the rule without removing it."),
+ it will allow you to hide the rule without removing it."),
'sequence': fields.integer('Sequence', help="Gives the sequence order \
-when displaying a list of rules."),
+when displaying a list of rules."),
'trg_date_type': fields.selection([
- ('none', 'None'),
- ('create', 'Creation Date'),
- ('action_last', 'Last Action Date'),
- ('date', 'Date'),
- ('deadline', 'Deadline'),
- ], 'Trigger Date', size=16),
+ ('none', 'None'),
+ ('create', 'Creation Date'),
+ ('action_last', 'Last Action Date'),
+ ('date', 'Date'),
+ ('deadline', 'Deadline'),
+ ], 'Trigger Date', size=16),
'trg_date_range': fields.integer('Delay after trigger date', \
help="Delay After Trigger Date,\
specifies you can put a negative number. If you need a delay before the \
-trigger date, like sending a reminder 15 minutes before a meeting."),
+trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_date_range_type': fields.selection([('minutes', 'Minutes'), ('hour', 'Hours'), \
- ('day', 'Days'), ('month', 'Months')], 'Delay type'),
- 'trg_user_id': fields.many2one('res.users', 'Responsible'),
- 'trg_partner_id': fields.many2one('res.partner', 'Partner'),
- 'trg_partner_categ_id': fields.many2one('res.partner.category', 'Partner Category'),
- 'trg_state_from': fields.selection(_state_get, 'State', size=16),
- 'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
+ ('day', 'Days'), ('month', 'Months')], 'Delay type'),
+ 'trg_user_id': fields.many2one('res.users', 'Responsible'),
+ 'trg_partner_id': fields.many2one('res.partner', 'Partner'),
+ 'trg_partner_categ_id': fields.many2one('res.partner.category', 'Partner Category'),
+ 'trg_state_from': fields.selection(_state_get, 'State', size=16),
+ 'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
- 'act_method': fields.char('Call Object Method', size=64),
- 'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
- 'act_state': fields.selection(_state_get, 'Set State to', size=16),
+ 'act_method': fields.char('Call Object Method', size=64),
+ 'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
+ 'act_state': fields.selection(_state_get, 'Set State to', size=16),
'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
These people will receive a copy of the future communication between partner \
-and users by email"),
+and users by email"),
'act_remind_partner': fields.boolean('Remind Partner', help="Check \
-this if you want the rule to send a reminder by email to the partner."),
+this if you want the rule to send a reminder by email to the partner."),
'act_remind_user': fields.boolean('Remind Responsible', help="Check \
-this if you want the rule to send a reminder by email to the user."),
- 'act_reply_to': fields.char('Reply-To', size=64),
- 'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
+this if you want the rule to send a reminder by email to the user."),
+ 'act_reply_to': fields.char('Reply-To', size=64),
+ 'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
- this if you want the rule to send an email to the responsible person."),
- 'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
+ this if you want the rule to send an email to the responsible person."),
+ 'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
help="Check this if you want \
-the rule to mark CC(mail to any other person defined in actions)."),
+the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
- help="Email-id of the persons whom mail is to be sent"),
- 'act_mail_body': fields.text('Mail body', help="Content of mail"),
+ help="Email-id of the persons whom mail is to be sent"),
+ 'act_mail_body': fields.text('Mail body', help="Content of mail"),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
-\nNote: This is case sensitive search."),
- 'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
- 'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
+\nNote: This is case sensitive search."),
+ 'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
+ 'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
'act_email_from' : fields.char('Email From', size=64, required=False,
help="Use a python expression to specify the right field on which one than we will use for the 'From' field of the header"),
'act_email_to' : fields.char('Email To', size=64, required=False,
@@ -118,17 +118,17 @@ the rule to mark CC(mail to any other person defined in actions)."),
}
_defaults = {
- 'active': lambda *a: True,
- 'trg_date_type': lambda *a: 'none',
- 'trg_date_range_type': lambda *a: 'day',
- 'act_mail_to_user': lambda *a: 0,
- 'act_remind_partner': lambda *a: 0,
- 'act_remind_user': lambda *a: 0,
- 'act_mail_to_watchers': lambda *a: 0,
+ 'active': lambda *a: True,
+ 'trg_date_type': lambda *a: 'none',
+ 'trg_date_range_type': lambda *a: 'day',
+ 'act_mail_to_user': lambda *a: 0,
+ 'act_remind_partner': lambda *a: 0,
+ 'act_remind_user': lambda *a: 0,
+ 'act_mail_to_watchers': lambda *a: 0,
}
-
+
_order = 'sequence'
-
+
def onchange_model_id(self, cr, uid, ids, name):
#This is not a good solution as it will affect the domain only on onchange
res = {'domain':{'filter_id':[]}}
@@ -165,7 +165,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
self.pre_action(cr, uid, [new_id], model, context=context)
return new_id
return make_call_old
-
+
def _write(self, old_write, model, context=None):
if not context:
context = {}
@@ -191,9 +191,9 @@ the rule to mark CC(mail to any other person defined in actions)."),
return True
def create(self, cr, uid, vals, context=None):
res_id = super(base_action_rule, self).create(cr, uid, vals, context)
- self._register_hook(cr, uid, [res_id], context=context)
+ self._register_hook(cr, uid, [res_id], context=context)
return res_id
-
+
def write(self, cr, uid, ids, vals, context=None):
res = super(base_action_rule, self).write(cr, uid, ids, vals, context)
self._register_hook(cr, uid, ids, context=context)
@@ -207,7 +207,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
rule_pool = self.pool.get('base.action.rule')
rule_ids = rule_pool.search(cr, uid, [], context=context)
return self._register_hook(cr, uid, rule_ids, context=context)
-
+
def format_body(self, body):
""" Foramat Action rule's body
@@ -219,18 +219,18 @@ the rule to mark CC(mail to any other person defined in actions)."),
@param self: The object pointer """
data = {
- 'object_id': obj.id,
- 'object_subject': hasattr(obj, 'name') and obj.name or False,
- 'object_date': hasattr(obj, 'date') and obj.date or False,
- 'object_description': hasattr(obj, 'description') and obj.description or False,
- 'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/',
+ 'object_id': obj.id,
+ 'object_subject': hasattr(obj, 'name') and obj.name or False,
+ 'object_date': hasattr(obj, 'date') and obj.date or False,
+ 'object_description': hasattr(obj, 'description') and obj.description or False,
+ 'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/',
'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and \
- obj.user_id.address_id and obj.user_id.address_id.email) or '/',
+ obj.user_id.address_id and obj.user_id.address_id.email) or '/',
'object_user_phone': hasattr(obj, 'user_id') and (obj.user_id and\
- obj.user_id.address_id and obj.user_id.address_id.phone) or '/',
- 'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/',
+ obj.user_id.address_id and obj.user_id.address_id.phone) or '/',
+ 'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/',
'partner_email': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and\
- obj.partner_address_id.email) or '/',
+ obj.partner_address_id.email) or '/',
}
return self.format_body(body % data)
@@ -259,7 +259,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
emailfrom = tools.ustr(emailfrom)
reply_to = emailfrom
if not emailfrom:
- raise osv.except_osv(_('Error!'),
+ raise osv.except_osv(_('Error!'),
_("No E-Mail ID Found for your Company address!"))
return tools.email_send(emailfrom, emails, name, body, reply_to=reply_to, openobject_id=str(obj.id))
@@ -272,7 +272,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
@param context: A standard dictionary for contextual values """
if context is None:
context = {}
- ok = True
+ ok = True
if action.filter_id:
if action.model_id.model == action.filter_id.model_id:
context.update(eval(action.filter_id.context))
@@ -418,10 +418,10 @@ the rule to mark CC(mail to any other person defined in actions)."),
base = datetime.strptime(obj.date, '%Y-%m-%d %H:%M:%S')
if base:
fnct = {
- 'minutes': lambda interval: timedelta(minutes=interval),
- 'day': lambda interval: timedelta(days=interval),
- 'hour': lambda interval: timedelta(hours=interval),
- 'month': lambda interval: timedelta(months=interval),
+ 'minutes': lambda interval: timedelta(minutes=interval),
+ 'day': lambda interval: timedelta(days=interval),
+ 'hour': lambda interval: timedelta(hours=interval),
+ 'month': lambda interval: timedelta(months=interval),
}
d = base + fnct[action.trg_date_range_type](action.trg_date_range)
dt = d.strftime('%Y-%m-%d %H:%M:%S')
@@ -463,15 +463,15 @@ the rule to mark CC(mail to any other person defined in actions)."),
return True
_constraints = [
- (_check_mail, 'Error: The mail is not well formated', ['act_mail_body']),
+ (_check_mail, 'Error: The mail is not well formated', ['act_mail_body']),
]
base_action_rule()
class ir_cron(osv.osv):
- _inherit = 'ir.cron'
-
+ _inherit = 'ir.cron'
+
def _poolJobs(self, db_name, check=False):
try:
db = pooler.get_db(db_name)
diff --git a/addons/base_calendar/test/base_calendar_test.yml b/addons/base_calendar/test/base_calendar_test.yml
index 8c5f7acaaa5..e04be20ccc2 100644
--- a/addons/base_calendar/test/base_calendar_test.yml
+++ b/addons/base_calendar/test/base_calendar_test.yml
@@ -42,8 +42,8 @@
name: All day test event
rrule_type: none
- |
- In order to check reminder I will first create reminder
--
+ In order to check reminder I will first create reminder
+-
!record {model: res.alarm, id: res_alarm_daybeforeeventstarts0}:
name: 1 Day before event starts
trigger_duration: 1
@@ -57,7 +57,7 @@
self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
- |
In order to assign attendee I will invite Demo user
--
+-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
send_mail: False
diff --git a/addons/base_module_quality/unit_test/__init__.py b/addons/base_module_quality/unit_test/__init__.py
deleted file mode 100644
index f96719c920e..00000000000
--- a/addons/base_module_quality/unit_test/__init__.py
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/base_module_quality/unit_test/unit_test.py b/addons/base_module_quality/unit_test/unit_test.py
deleted file mode 100644
index 598d443382f..00000000000
--- a/addons/base_module_quality/unit_test/unit_test.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# Copyright (C) 2004-2010 Tiny SPRL (). All Rights Reserved
-# $Id$
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-#
-##############################################################################
-import os
-
-from osv import fields, osv
-from tools.translate import _
-import pooler
-from tools import config
-from base_module_quality import base_module_quality
-
-class quality_test(base_module_quality.abstract_quality_check):
-
- def __init__(self):
- super(quality_test, self).__init__()
- self.bool_installed_only = True
- self.name = _("Unit Test")
- self.note = _("""
-This test checks the Unit Test(PyUnit) Cases of the module. Note that 'unit_test/test.py' is needed in module.
-
-""")
- self.min_score = 0
- self.message = 'This test does not calculate score'
- self.bool_count_score = False
- return None
-
- def run_test(self, cr, uid, module_path):
- pool = pooler.get_pool(cr.dbname)
- module_name = module_path.split('/')[-1]
- test_file = config['addons_path'] +'/' + module_name +'/unit_test/test.py'
- if not os.path.isfile(test_file):
- self.result += _("Module does not have 'unit_test/test.py' file")
- return None
- module_obj = pool.get('ir.module.module')
- module_ids = module_obj.search(cr, uid, [('name', '=', module_name)])
- module = module_obj.browse(cr, uid, module_ids)
- if not len(module):
- self.result += _("Error! Module is not properly loaded/installed")
- return None
- module = module[0]
- test = module.name + '.' + 'unit_test.test'
- test_module = __import__(test)
- test_file = getattr(test_module, 'unit_test')
- test_obj = getattr(test_file, 'test')
-
- test_result = test_obj.runTest(cr,uid)
- self.result = self.get_result(test_result)
- self.result_details += self.get_result_details(test_result)
- return None
-
- def get_result(self, data_list):
- header = ('{| border="1" cellspacing="0" cellpadding="5" align="left" \n! %-40s \n! %-40s \n', [_('Summary'), _('Status')])
- result_unit = {}
- res_list = []
- if data_list[0]:
- res = data_list[1].split('\n')
- res_list.append(res[-4:][0])
- res_list.append(res[-4:][2])
- result_unit['unit_test'] = res_list
- return self.format_table(header, data_list=result_unit)
- return "Unit Test Fail"
-
- def get_result_details(self, data_list):
- detail = '''%s
- | Test Cases | Result | '''%(self.get_style())
- html = ''
-
- if data_list[0] == True:
- data = data_list[1].split('... ok')
- for case in map(lambda x:x[0].replace('\n',''),map(lambda x: x.split(' ('),data)):
- if case.find('Ran') != -1:
- case = case[case.index('Ran'):-2]
- html += '
|---|
| %s | OK |
'%(case)
- else:
- html += '| %s | OK |
'%(case)
- res = detail + html + '
'
- return res
- else:
- detail_dict = {}
- detail += '''Details | '''
- data = data_list[1].split("======================================================================")
- test = data[0].split('\n')
- for err in (data_list[0].failures,data_list[0].errors):
- for value in err:
- detail_dict[value[0]._testMethodName] = value[1]
- for case in map(lambda x:x.split('...'), test):
- if len(case[0]) < 2:
- continue
- test_name = case[0].split(' (')[0]
- if not detail_dict.has_key(test_name):
- detail_dict[test_name] = ''
- html += '| %s | %s | %s |
'%(test_name, case[1], detail_dict[test_name])
- return detail + html +'