From 7a03c0c10d85cf761d425cd8a2c7b7affc05f1fb Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Tue, 17 Dec 2013 12:13:40 +0100 Subject: [PATCH] [IMP] Add required to mail and subject fields in file.document.condition when type is normal --- file_document.py | 9 ++++++--- file_document_view.xml | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/file_document.py b/file_document.py index 58892c99..9653a0cb 100644 --- a/file_document.py +++ b/file_document.py @@ -128,13 +128,16 @@ class file_document_condition(orm.Model): return self.get_file_document_condition_type(cr, uid, context=context) def get_file_document_condition_type(self, cr, uid, context=None): - return [('normal', 'Normal'), ('test', 'TEST')] + return [('normal', 'Normal')] _columns = { 'from_email': fields.char('Email', size=64), 'mail_subject': fields.char('Mail Subject', size=64), 'type': fields.selection(_get_file_document_condition_type, - 'Type', help="Create your own type if the normal type do not correspond to your need", required=True), - 'file_extension' : fields.char('File Extension', size=64, help="File extension or file name", required=True), + 'Type', help="Create your own type if the normal type \ + do not correspond to your need", required=True), + 'file_extension' : fields.char('File Extension', size=64, + help="File extension or file name", + required=True), 'server_id': fields.many2one('fetchmail.server', 'Server Mail'), } diff --git a/file_document_view.xml b/file_document_view.xml index 4690837c..7addf407 100644 --- a/file_document_view.xml +++ b/file_document_view.xml @@ -30,6 +30,20 @@ + + view_file_document_condition_form + file.document.condition + +
+ + + + + + + +
+ Configuration file.document.condition