From ef2df88fcb689872f9e2c937b59f7995838a29e1 Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Fri, 22 Jan 2010 16:51:00 +0530 Subject: [PATCH] document_change: Improve the workflow bzr revid: sbh@tinyerp.com-20100122112100-mda5z1zibssv4c8v --- addons/document_change/document_change.py | 9 +++++---- .../document_change/document_change_view.xml | 4 +++- .../document_process_workflow.xml | 18 +++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/addons/document_change/document_change.py b/addons/document_change/document_change.py index e58c7e7e4d1..d23b64e1e9d 100644 --- a/addons/document_change/document_change.py +++ b/addons/document_change/document_change.py @@ -68,7 +68,7 @@ class doucment_change_process_phase(osv.osv): 'type': fields.selection([('control_required', 'Control Required'),('no_control', 'No Control')], 'Type'), 'date_control': fields.date('Control Date', select=True), 'phase_ids':fields.many2one('document.change.process.phase','Phase Type'), - 'state': fields.selection([('draft', 'Draft'),('started', 'Started'),('validate', 'To Validate'), ('done', 'Done')], 'Status',readonly=True), + 'state': fields.selection([('draft', 'Draft'),('in_process', 'Started'),('validate', 'To Validate'),('pending', 'Pending'), ('done', 'Done')], 'Status',readonly=True), 'phase_document_ids':fields.many2many('ir.attachment','phase_document_rel','phase_id','document_id','Document'), } _defaults = { @@ -79,14 +79,15 @@ class doucment_change_process_phase(osv.osv): def state_draft_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'draft'}) return True - def state_validate_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'validate'}) return True def state_started_set(self, cr, uid, ids, *args): - self.write(cr, uid, ids, {'state':'started'}) + self.write(cr, uid, ids, {'state':'in_process'}) return True - + def state_pending_set(self, cr, uid, ids, *args): + self.write(cr, uid, ids, {'state':'pending'}) + return True def state_done_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'done'}) return True diff --git a/addons/document_change/document_change_view.xml b/addons/document_change/document_change_view.xml index 90bcf2b5024..cba8e6c7122 100644 --- a/addons/document_change/document_change_view.xml +++ b/addons/document_change/document_change_view.xml @@ -344,7 +344,9 @@