Fix bug for PGSQL Migration 3.4->3.5

Fix bug on create invoice from contract

http://www.dolibarr.fr/forum/5-bugs-sur-la-version-cvs-ou-demo/43056-bug-creation-facture-dun-contrat-v35-alpha