Also remove useless & bonkers conditionals (checking that a key exists
in a dict and then setting one of its sub-keys whether or not the test
succeeded is going to blow up either way), and simplify the code since
if condition:
some_value = True
else:
some_value = False
can just be written as:
some_value = condition
lp bug: https://launchpad.net/bugs/905188 fixed
bzr revid: xmo@openerp.com-20111222134620-bpi9d24msbia4ymm