summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Wirtel <stephane@openerp.com>2010-04-22 13:55:35 +0200
committerStephane Wirtel <stephane@openerp.com>2010-04-22 13:55:35 +0200
commitf3aa34689688a5ff6eb2f5af7d3a8d4c60428fc0 (patch)
tree56f17a7aba4fdb75f576670c8324a83560c41992
parentdb5a669c554fe607a0dbda56fa4596c83ed536b7 (diff)
[FIX] crm: Reset the 'Draft' flag for the opportunities and leads
bzr revid: stephane@openerp.com-20100422115535-4ou5x31qc45jlbam
-rw-r--r--addons/crm/crm_opportunity.py3
-rwxr-xr-xaddons/crm/scripts/openerp_mailgate/openerp_mailgate.py1
2 files changed, 3 insertions, 1 deletions
diff --git a/addons/crm/crm_opportunity.py b/addons/crm/crm_opportunity.py
index 3e1fc24a803..e147d4ed20d 100644
--- a/addons/crm/crm_opportunity.py
+++ b/addons/crm/crm_opportunity.py
@@ -27,7 +27,7 @@ import time
import mx.DateTime
AVAILABLE_STATES = [
- ('draft','New'),
+ ('draft','Draft'),
('open','Open'),
('cancel', 'Lost'),
('done', 'Converted'),
@@ -190,6 +190,7 @@ class crm_opportunity(osv.osv):
_defaults = {
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.opportunity', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+ 'state' : 'draft',
}
def action_makeMeeting(self, cr, uid, ids, context=None):
diff --git a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
index bb0adb0444a..de8fac00fce 100755
--- a/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
+++ b/addons/crm/scripts/openerp_mailgate/openerp_mailgate.py
@@ -183,6 +183,7 @@ class email_parser(object):
'email_cc': msg_cc,
'user_id': False,
'description': message['body'],
+ 'state' : 'draft',
}
data.update(self.partner_get(msg_from))