summaryrefslogtreecommitdiff
path: root/addons/project_issue/project_issue.py
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-09-06 10:35:00 +0200
committerChristophe Matthieu <chm@openerp.com>2013-09-06 10:35:00 +0200
commit8a3f1742e0e9c7acaae726e5c7106d2d7df7e970 (patch)
tree78ae5d981fcd25677caea5c8b3999b1e77bf4547 /addons/project_issue/project_issue.py
parent6f6c59ec1de1881a70e4bf728ea5d8b56bd609f9 (diff)
parentc80cf7d0646463b290137c26fbada568a6942b00 (diff)
[MERGE] from website-al
bzr revid: chm@openerp.com-20130906083500-4n5knaxiqt4cg2ht
Diffstat (limited to 'addons/project_issue/project_issue.py')
-rw-r--r--addons/project_issue/project_issue.py16
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)