[FIX]procurement : traceback in sql request when message was too large -> changed to write and removed limit size

bzr revid: csn@openerp.com-20130201145702-m35h1spf9jx02swr
This commit is contained in:
csn-openerp 2013-02-01 15:57:02 +01:00
parent 925e7456b1
commit 9bd291f48f
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ class procurement_order(osv.osv):
readonly=True, required=True, help="If you encode manually a Procurement, you probably want to use" \
" a make to order method."),
'note': fields.text('Note'),
'message': fields.char('Latest error', size=124, help="Exception occurred while computing procurement orders."),
'message': fields.char('Latest error', help="Exception occurred while computing procurement orders."),
'state': fields.selection([
('draft','Draft'),
('cancel','Cancelled'),
@ -367,7 +367,7 @@ class procurement_order(osv.osv):
if message:
message = _("Procurement '%s' is in exception: ") % (procurement.name) + message
cr.execute('update procurement_order set message=%s where id=%s', (message, procurement.id))
procurement.write({'message': message})
self.message_post(cr, uid, [procurement.id], body=message, context=context)
return ok