Fix comparision of account type on updating chart of accounts

issue4272
review8661002
(grafted from 47c533213bfaa567fe75961de55ff2131c9374fc)

--HG--
branch : 2.6
extra : source : 47c533213bfaa567fe75961de55ff2131c9374fc