[IMP] purchase: put back sql request to set exception message and avoid context hack

bzr revid: mat@openerp.com-20131009122714-rqhciu8ozy059pyn
This commit is contained in:
Martin Trigaux 2013-10-09 14:27:14 +02:00
parent 2779496635
commit 6bd70af1de
1 changed files with 1 additions and 4 deletions

View File

@ -1047,10 +1047,7 @@ class procurement_order(osv.osv):
if message:
if procurement.message != message:
#temporary context passed in write to prevent an infinite loop
ctx_wkf = dict(context or {})
ctx_wkf['workflow.trg_write.%s' % self._name] = False
self.write(cr, uid, [procurement.id], {'message':message}, context=ctx_wkf)
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
return False
if user.company_id and user.company_id.partner_id: