Fix for new field attributes names
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user