From 6ba45e5cbf37a1fe762ea19950cddb353fd850ae Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 21 Oct 2013 11:57:35 +0200 Subject: [PATCH] [FIX] procurement: change SQL query to be compatible with both postgres 8.4 and 9.3 bzr revid: mat@openerp.com-20131021095735-yz9pb5pphfdgl44j --- addons/procurement/procurement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/procurement/procurement.py b/addons/procurement/procurement.py index f5d4761642b..66024256f9a 100644 --- a/addons/procurement/procurement.py +++ b/addons/procurement/procurement.py @@ -140,7 +140,7 @@ class procurement_order(osv.osv): if not proc.note or '_first_pass_done_' not in proc.note or proc.state not in ('confirmed', 'exception'): super(procurement_order, self).message_track(cr, uid, [proc.id], tracked_fields, initial_values, context=context) if proc.state == 'exception': - cr.execute("""UPDATE procurement_order set note = CONCAT(note, %s) WHERE id = %s""", ('_first_pass_done_',proc.id)) + cr.execute("""UPDATE procurement_order set note = TRIM(both E'\n' FROM COALESCE(note, '') || %s) WHERE id = %s""", ('\n\n_first_pass_done_',proc.id)) return True