From f60b79d32ea291c2386b7dcd0684084e1b67d378 Mon Sep 17 00:00:00 2001 From: "uco (OpenERP)" Date: Fri, 22 Jan 2010 14:13:42 +0530 Subject: [PATCH] [ADD] document_change: Added workflow file for Process Changes. bzr revid: uco@tinyerp.co.in-20100122084342-1112xhfawr4iyipa --- addons/document_change/__terp__.py | 1 + addons/document_change/document_change.py | 4 +- .../document_change/document_change_view.xml | 10 ++- .../document_process_workflow.xml | 68 +++++++++++++++++++ 4 files changed, 79 insertions(+), 4 deletions(-) create mode 100644 addons/document_change/document_process_workflow.xml diff --git a/addons/document_change/__terp__.py b/addons/document_change/__terp__.py index 78d62ff9e71..ae230e0bdef 100644 --- a/addons/document_change/__terp__.py +++ b/addons/document_change/__terp__.py @@ -36,6 +36,7 @@ 'document_change_sequence.xml', 'document_change_workflow.xml', 'document_phase_workflow.xml', + 'document_process_workflow.xml', ], 'demo_xml': [ ], 'installable': True, diff --git a/addons/document_change/document_change.py b/addons/document_change/document_change.py index 237d7abfc49..7dadacba952 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'), ('end', 'End')], 'Status'), + 'state': fields.selection([('draft', 'Draft'),('started', 'Started'),('validate', 'To Validate'), ('end', 'End')], 'Status', readonly=True), 'phase_document_ids':fields.many2many('ir.attachment','phase_document_rel','phase_id','document_id','Document'), } _defaults = { @@ -165,7 +165,7 @@ class doucment_change_process(osv.osv): 'create_date':fields.datetime('Creation',readonly=True), 'latest_modified_date':fields.function(_latestmodification, method=True, type='date', string="Lastest Modification"), #TODO no year! 'date_expected':fields.datetime('Expected Production'), - 'state':fields.selection([('draft', 'Draft'),('progress', 'Progress'),('confirmed', 'To Validate'), ('done', 'Done'),('done', 'Done'),('cancel','Cancelled')], 'Status'), + 'state':fields.selection([('draft', 'Draft'),('progress', 'Progress'),('confirmed', 'To Validate'), ('done', 'Done'),('cancel','Cancelled')], 'Status', readonly=True), 'process_phase_ids':fields.one2many('document.change.process.phase','process_id','Phase'), 'process_document_ids': fields.many2many('ir.attachment','document_changed_process_rel','process_id','change_id','Document To Change'), 'pending_directory_id' :fields.many2one('document.directory','Pending Directory ID'), diff --git a/addons/document_change/document_change_view.xml b/addons/document_change/document_change_view.xml index fa40eb87765..b5f6f5862bd 100644 --- a/addons/document_change/document_change_view.xml +++ b/addons/document_change/document_change_view.xml @@ -419,8 +419,14 @@ - - + + + +