diff options
Diffstat (limited to 'addons/project_issue/project_issue.py')
| -rw-r--r-- | addons/project_issue/project_issue.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index ace27f13dd1..f23f6b6a286 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -60,7 +60,6 @@ class project_issue(osv.Model): } def _get_default_partner(self, cr, uid, context=None): - """ Override of base_stage to add project specific behavior """ project_id = self._get_default_project_id(cr, uid, context) if project_id: project = self.pool.get('project.project').browse(cr, uid, project_id, context=context) @@ -394,6 +393,8 @@ class project_issue(osv.Model): # stage change: update date_last_stage_update if 'stage_id' in vals: vals['date_last_stage_update'] = fields.datetime.now() + if 'kanban_state' not in vals: + vals['kanban_state'] = 'normal' # user_id change: update date_start if vals.get('user_id'): vals['date_start'] = fields.datetime.now() @@ -466,7 +467,6 @@ class project_issue(osv.Model): self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False}) else: raise osv.except_osv(_('Warning!'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!')) - self.case_set(cr, uid, ids, 'draft', data, context=context) return True # ------------------------------------------------------- @@ -495,21 +495,19 @@ class project_issue(osv.Model): through message_process. This override updates the document according to the email. """ - if custom_values is None: custom_values = {} - if context is None: context = {} + if custom_values is None: + custom_values = {} + if context is None: + context = {} context['state_to'] = 'draft' - - desc = html2plaintext(msg.get('body')) if msg.get('body') else '' - defaults = { 'name': msg.get('subject') or _("No Subject"), - 'description': desc, 'email_from': msg.get('from'), 'email_cc': msg.get('cc'), 'partner_id': msg.get('author_id', False), 'user_id': False, } - if msg.get('priority'): + if msg.get('priority'): defaults['priority'] = msg.get('priority') defaults.update(custom_values) |
