[IMP] disable res.log when running config wizards; to be tested

bzr revid: rco@openerp.com-20110805153134-snpfjuw859wkrq36
This commit is contained in:
Raphael Collet
2011-08-05 17:31:34 +02:00
parent 0172177218
commit 2d353ca2f8
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -856,7 +856,11 @@ Normal Recurring: the wizard is visible in the configuration panel regardless of
wizard = self.browse(cr, uid, wizard_id, context=context)
res = self.pool.get('ir.actions.act_window').read(cr, uid, wizard.action_id.id, [], context=context)
res.update({'nodestroy': True})
# disable log when running wizard
res['context'] = res.get('context') or {}
res['context'].update({'disable_log': True})
# Open a specific record when res_id is provided in the context
if res.get('context'):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
@@ -864,6 +868,8 @@ Normal Recurring: the wizard is visible in the configuration panel regardless of
if ctx.get('res_id'):
res.update({'res_id': ctx.pop('res_id')})
res.update({'context': ctx})
#
return res
def action_open(self, cr, uid, ids, context=None):
+2
View File
@@ -607,6 +607,8 @@ class orm_template(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,