Fix for new field attributes names

This commit is contained in:
Cédric Krier
2009-02-03 19:00:45 +01:00
parent f67d6eb409
commit c35fa9bc06
+6 -6
View File
@@ -12,15 +12,15 @@ class TimesheetWork(OSV):
def __init__(self):
super(TimesheetWork, self).__init__()
self.parent = copy.copy(self.parent)
if not self.parent._context:
self.parent._context = "{'project_type': locals().get('project_type')}"
elif 'project_type' not in self.parent._context:
if not self.parent.context:
self.parent.context = "{'project_type': locals().get('project_type')}"
elif 'project_type' not in self.parent.context:
sep = ''
if self.parent._context[-2] != ',':
if self.parent.context[-2] != ',':
sep = ','
self.parent._context = self.parent._context[:-1] + \
self.parent.context = self.parent.context[:-1] + \
sep + "'project_type': locals().get('project_type')" + \
self.parent._context[-1:]
self.parent.context[-1:]
self._reset_columns()
TimesheetWork()