2013-01-07 01:27:41 |
hivam |
description |
OpenERP 7.0 thrunk version 7.0alpha-20130103-000101
In the attached picture you can see an event starting on January 3, 2013 at 20 hours and end time at 24 hours.
However, in the name of the event can be seen that concatenates the name and the date January 4, 2013.
My config time-zone: América-Bogotá (GMT - 5:00 )
The function name_get is:
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):
date = record.date_begin.split(" ")[0]
date_end = record.date_end.split(" ")[0]
if date != date_end:
date += ' - ' + date_end
display_name = record.name + ' (' + date + ')'
res.append((record['id'], display_name))
return res |
OpenERP 7.0 thrunk version 7.0alpha-20130103-000101
In the attached picture you can see an event starting on January 3, 2013 at 20 hours and end time at 24 hours.
However, in the name of the event can be seen that concatenates the name and the date January 4, 2013.
My config time-zone: América-Bogotá (GMT - 5:00 )
The function name_get is:
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):
date = record.date_begin.split(" ")[0]
date_end = record.date_end.split(" ")[0]
if date != date_end:
date += ' - ' + date_end
display_name = record.name + ' (' + date + ')'
res.append((record['id'], display_name))
return res |
|