From 263f04443e15451548215f55696e5eacc0e64dc3 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Wed, 1 Sep 2010 10:39:40 +0100 Subject: [PATCH] Add Unchanged state to note dialogue and use it by default. bzr revid: daniel.watkins@credativ.co.uk-20100901093940-5q07aglarui7rch6 --- addons/crm/wizard/crm_add_note.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/crm/wizard/crm_add_note.py b/addons/crm/wizard/crm_add_note.py index 02c492b131c..e63ef409ffa 100644 --- a/addons/crm/wizard/crm_add_note.py +++ b/addons/crm/wizard/crm_add_note.py @@ -3,6 +3,9 @@ from osv import fields, osv from tools.translate import _ +AVAILABLE_STATES = crm.AVAILABLE_STATES + [('unchanged', 'Unchanged')] + + class crm_add_note(osv.osv_memory): """Adds a new note to the case.""" _name = 'crm.add.note' @@ -10,7 +13,7 @@ class crm_add_note(osv.osv_memory): _columns = { 'body': fields.text('Note Body', required=True), - 'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True), + 'state': fields.selection(AVAILABLE_STATES, string='Set New State To', required=True), } def action_add(self, cr, uid, ids, context=None): @@ -46,7 +49,7 @@ class crm_add_note(osv.osv_memory): """ This function gets default values """ - return {'state': u'pending'} + return {'state': u'unchanged'} crm_add_note()