diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py index 1af5818438a..bfbe734adbf 100644 --- a/openerp/addons/base/ir/ir_model.py +++ b/openerp/addons/base/ir/ir_model.py @@ -717,8 +717,8 @@ class ir_model_data(osv.osv): model_obj = self.pool.get(model) if not context: context = {} - # records created during module install should result in res.log entries that are already read! - context = dict(context, res_log_read=True) + # TODO: records created during module install should not display the messages of OpenChatter + context = dict(context) if xml_id and ('.' in xml_id): assert len(xml_id.split('.'))==2, _("'%s' contains too many dots. XML ids should not contain dots ! These are used to refer to other modules data, as in module.reference_id") % (xml_id) module, xml_id = xml_id.split('.') diff --git a/openerp/addons/base/publisher_warranty/publisher_warranty.py b/openerp/addons/base/publisher_warranty/publisher_warranty.py index 0669dadb228..2f885f318a4 100644 --- a/openerp/addons/base/publisher_warranty/publisher_warranty.py +++ b/openerp/addons/base/publisher_warranty/publisher_warranty.py @@ -187,6 +187,7 @@ class publisher_warranty_contract(osv.osv): limit_date = (datetime.datetime.now() - _PREVIOUS_LOG_CHECK).strftime(misc.DEFAULT_SERVER_DATETIME_FORMAT) + # TODO: must be updated with OpenChatter ? for message in result["messages"]: ids = self.pool.get("res.log").search(cr, uid, [("res_model", "=", "publisher_warranty.contract"), ("create_date", ">=", limit_date), diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index efc73d44a58..8ed79a4d615 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -212,10 +212,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= delattr(package, kind) cr.commit() - - # mark new res_log records as read - cr.execute("update res_log set read=True where create_date >= %s", (dt_before_load,)) - + cr.commit() return loaded_modules, processed_modules diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 6d65edfbb5c..776d639bf43 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -710,17 +710,7 @@ class BaseModel(object): CONCURRENCY_CHECK_FIELD = '__last_update' def log(self, cr, uid, id, message, secondary=False, context=None): - if context and context.get('disable_log'): - return True - return self.pool.get('res.log').create(cr, uid, - { - 'name': message, - 'res_model': self._name, - 'secondary': secondary, - 'res_id': id, - }, - context=context - ) + return _logger.warning("log() is deprecated. Please use OpenChatter notification system instead of the res.log mechanism.") @staticmethod def get_needaction_info(cr, uid, model_name, user_id, limit=None, order=None, domain=False, context=None):