7.0 bug 1253052 parent order

Port of Cedric Le Brouster's fix for https://bugs.launchpad.net/openobject-server/+bug/1253052 to github.