[Fix] project,resource,subscription: Fix wrong helptext for field active
[odoo/odoo.git] / addons / subscription / subscription.py
index f2426fd..9361548 100644 (file)
@@ -1,39 +1,37 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
 ##############################################################################
-#
-#    OpenERP, Open Source Management Solution  
-#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
-#    $Id$
+#    
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
 #
 #    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
 #
 #    This program is distributed in the hope that it will be useful,
 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
+#    GNU Affero General Public License for more details.
 #
-#    You should have received a copy of the GNU General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
 #
 ##############################################################################
 
 # TODO:
 #   Error treatment: exception, request, ... -> send request to user_id
 
-from mx import DateTime
 import time
 from osv import fields,osv
 from tools.translate import _
 
 class subscription_document(osv.osv):
     _name = "subscription.document"
-    _description = "Subscription document"
+    _description = "Subscription Document"
     _columns = {
         'name': fields.char('Name', size=60, required=True),
-        'active': fields.boolean('Active'),
+        'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the subscription document without removing it."),
         'model': fields.many2one('ir.model', 'Object', required=True),
         'field_ids': fields.one2many('subscription.document.fields', 'document_id', 'Fields')
     }
@@ -50,11 +48,11 @@ subscription_document()
 
 class subscription_document_fields(osv.osv):
     _name = "subscription.document.fields"
-    _description = "Subscription document fields"
+    _description = "Subscription Document Fields"
     _rec_name = 'field'
     _columns = {
         'field': fields.many2one('ir.model.fields', 'Field', domain="[('model_id', '=', parent.model)]", required=True),
-        'value': fields.selection([('false','False'),('date','Current Date')], 'Default Value', size=40),
+        'value': fields.selection([('false','False'),('date','Current Date')], 'Default Value', size=40, help="Default value is considered for field when new document is generated."),
         'document_id': fields.many2one('subscription.document', 'Subscription Document', ondelete='cascade'),
     }
     _defaults = {}
@@ -69,7 +67,7 @@ class subscription_subscription(osv.osv):
     _description = "Subscription"
     _columns = {
         'name': fields.char('Name', size=60, required=True),
-        'active': fields.boolean('Active'),
+        'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the subscription without removing it."),
         'partner_id': fields.many2one('res.partner', 'Partner'),
         'notes': fields.text('Notes'),
         'user_id': fields.many2one('res.users', 'User', required=True),
@@ -77,10 +75,11 @@ class subscription_subscription(osv.osv):
         'interval_type': fields.selection([('days', 'Days'), ('weeks', 'Weeks'), ('months', 'Months')], 'Interval Unit'),
         'exec_init': fields.integer('Number of documents'),
         'date_init': fields.datetime('First Date'),
-        'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'Status'),
-        'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128),
+        'state': fields.selection([('draft','Draft'),('running','Running'),('done','Done')], 'State'),
+        'doc_source': fields.reference('Source Document', required=True, selection=_get_document_types, size=128, help="User can choose the source document on which he wants to create documents"),
         'doc_lines': fields.one2many('subscription.subscription.history', 'subscription_id', 'Documents created', readonly=True),
-        'cron_id': fields.many2one('ir.cron', 'Cron Job')
+        'cron_id': fields.many2one('ir.cron', 'Cron Job', help="Scheduler which runs on subscription"),
+        'note': fields.text('Notes', help="Description or Summary of Subscription"),
     }
     _defaults = {
         'date_init': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),