[IMP] openerp/osv/api: improve code for setting and propagating decorators