Browse Source

[FIX] using right logger

pull/78/head
Lorenzo Battistini 12 years ago
parent
commit
3c345f6e27
  1. 6
      super_calendar/super_calendar.py

6
super_calendar/super_calendar.py

@ -21,7 +21,7 @@
from openerp.osv import fields, osv, orm from openerp.osv import fields, osv, orm
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp import netsvc
from openerp import logging
from mako.template import Template from mako.template import Template
from datetime import datetime from datetime import datetime
from openerp import tools from openerp import tools
@ -33,7 +33,7 @@ def _models_get(self, cr, uid, context=None):
return [(r['model'], r['name']) for r in res] return [(r['model'], r['name']) for r in res]
class super_calendar_configurator(orm.Model): class super_calendar_configurator(orm.Model):
_logger = netsvc.Logger()
_logger = logging.getLogger('super.calendar')
_name = 'super.calendar.configurator' _name = 'super.calendar.configurator'
_columns = { _columns = {
'name': fields.char('Name', size=64, required=True), 'name': fields.char('Name', size=64, required=True),
@ -86,7 +86,7 @@ class super_calendar_configurator(orm.Model):
'model_id': line.name.id, 'model_id': line.name.id,
} }
super_calendar_pool.create(cr, uid, super_calendar_values) super_calendar_pool.create(cr, uid, super_calendar_values)
self._logger.notifyChannel('super_calendar', netsvc.LOG_INFO, "Calendar generated")
self._logger.info('Calendar generated')
return True return True
super_calendar_configurator() super_calendar_configurator()

Loading…
Cancel
Save