diff --git a/addons/account/account.py b/addons/account/account.py
index e11479e4dc0..7e0afba3700 100644
--- a/addons/account/account.py
+++ b/addons/account/account.py
@@ -111,7 +111,7 @@ class account_payment_term_line(osv.osv):
'days': fields.integer('Number of Days', required=True, help="Number of days to add before computation of the day of month." \
"If Date=15/01, Number of Days=22, Day of Month=-1, then the due date is 28/02."),
'days2': fields.integer('Day of the Month', required=True, help="Day of the month, set -1 for the last day of the current month. If it's positive, it gives the day of the next month. Set 0 for net days (otherwise it's based on the beginning of the month)."),
- 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True),
+ 'payment_id': fields.many2one('account.payment.term', 'Payment Term', required=True, select=True, ondelete='cascade'),
}
_defaults = {
'value': 'balance',
diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py
index 02da9a6ab1f..9acc09e9026 100644
--- a/addons/account/wizard/account_report_common.py
+++ b/addons/account/wizard/account_report_common.py
@@ -30,9 +30,11 @@ class account_common_report(osv.osv_memory):
_description = "Account Common Report"
def onchange_chart_id(self, cr, uid, ids, chart_account_id=False, context=None):
+ res = {}
if chart_account_id:
company_id = self.pool.get('account.account').browse(cr, uid, chart_account_id, context=context).company_id.id
- return {'value': {'company_id': company_id}}
+ res['value'] = {'company_id': company_id}
+ return res
_columns = {
'chart_account_id': fields.many2one('account.account', 'Chart of Account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
diff --git a/addons/crm_claim/crm_claim_menu.xml b/addons/crm_claim/crm_claim_menu.xml
index 46f8760387a..bb881d62a58 100644
--- a/addons/crm_claim/crm_claim_menu.xml
+++ b/addons/crm_claim/crm_claim_menu.xml
@@ -50,9 +50,9 @@
parent="base.menu_aftersale" action="crm_case_categ_claim0" sequence="1"/>
+
-
diff --git a/addons/event/event.py b/addons/event/event.py
index 1612265ca9c..64a2b187a5a 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -37,8 +37,8 @@ class event_type(osv.osv):
}
_defaults = {
'default_registration_min': 0,
- 'default_registration_max':0,
- }
+ 'default_registration_max': 0,
+ }
event_type()
@@ -52,8 +52,12 @@ class event_event(osv.osv):
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
+
+ if isinstance(ids, (long, int)):
+ ids = [ids]
+
res = []
- for record in self.browse(cr, uid, ids, context=context):
+ for record in self.browse(cr, uid, ids, context=context)
date = record.date_begin.split(" ")[0]
date_end = record.date_end.split(" ")[0]
if date != date_end:
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
index ca28b5bdb28..05e70a19acb 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py
@@ -442,8 +442,10 @@ class hr_timesheet_sheet(osv.osv):
return True
def name_get(self, cr, uid, ids, context=None):
- if not len(ids):
+ if not ids:
return []
+ if isinstance(ids, (long, int)):
+ ids = [ids]
return [(r['id'], r['date_from'] + ' - ' + r['date_to']) \
for r in self.read(cr, uid, ids, ['date_from', 'date_to'],
context=context, load='_classic_write')]
diff --git a/addons/stock/report/stock_graph.py b/addons/stock/report/stock_graph.py
index 5ee58bb9d2c..d92de2805b5 100644
--- a/addons/stock/report/stock_graph.py
+++ b/addons/stock/report/stock_graph.py
@@ -22,6 +22,7 @@ from pychart import *
import pychart.legend
import time
from report.misc import choice_colors
+import tools
#
# Draw a graph for stocks
@@ -41,7 +42,7 @@ class stock_graph(object):
product_name=product_name.replace('/', '//')
if product_id not in self._datas:
self._datas[product_id] = {}
- self._names[product_id] = product_name
+ self._names[product_id] = tools.ustr(product_name)
for (dt,stock) in datas:
if not dt in self._datas[product_id]:
self._datas[product_id][dt]=0