Review: Disapprove i reject. Instead of casting the string into integers you should have search the reason why the fields.selection was returning the keys as strings... I solved this issue by adding size=-1 on the definition of the fields.selection. Indeed, at the creation time of the fields.selection, the orm pick the first element of the list to decide if the postgres type will be a varchar or an integer. And with the old code first element was '' (and it was the only one because other are demo data, created after the field). So the trick -of size=-1 is used to force the database type to integer.
Moreover, this solution has the benefit of keeping a code more clean because 1) we don't have those cast into integers everywhere 2) the content of journal_id is an integer as the field name suggest instead of a string Thanks, Quentin -- https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-897159-new-bde/+merge/86534 Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-897159-new-bde. _______________________________________________ Mailing list: https://launchpad.net/~openerp-dev-gtk Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-dev-gtk More help : https://help.launchpad.net/ListHelp

