{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/OCB/issues/359","labels_url":"https://api.github.com/repos/OCA/OCB/issues/359/labels{/name}","comments_url":"https://api.github.com/repos/OCA/OCB/issues/359/comments","events_url":"https://api.github.com/repos/OCA/OCB/issues/359/events","html_url":"https://github.com/OCA/OCB/pull/359","id":114061331,"number":359,"title":"[FIX] prefer quants from same location in removal strategies","user":{"login":"clonedagain","id":391953,"avatar_url":"https://avatars.githubusercontent.com/u/391953?v=3","gravatar_id":"","url":"https://api.github.com/users/clonedagain","html_url":"https://github.com/clonedagain","followers_url":"https://api.github.com/users/clonedagain/followers","following_url":"https://api.github.com/users/clonedagain/following{/other_user}","gists_url":"https://api.github.com/users/clonedagain/gists{/gist_id}","starred_url":"https://api.github.com/users/clonedagain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clonedagain/subscriptions","organizations_url":"https://api.github.com/users/clonedagain/orgs","repos_url":"https://api.github.com/users/clonedagain/repos","events_url":"https://api.github.com/users/clonedagain/events{/privacy}","received_events_url":"https://api.github.com/users/clonedagain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-10-29T14:27:34Z","updated_at":"2015-11-18T08:23:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/OCB/pulls/359","html_url":"https://github.com/OCA/OCB/pull/359","diff_url":"https://github.com/OCA/OCB/pull/359.diff","patch_url":"https://github.com/OCA/OCB/pull/359.patch"},"body":"Previously the quants got ordered by id when all other sorting keys were equal. The problem with that is that when a quant gets split, one part gets a new ID which is much bigger that the other part. If this quant is not reserved and a removal is demanded, it will be considered after all the other quants. The result is that users may well be proposed to pick from several locations when in fact all the goods could have been reserved from the same location.\r\nThis fixes this bad proposal by sorting by location_id as a second-to-last resort (last resort still being the quant id).\r\n\r\nThe proposed changes don't seam to be significantly slower (discussed in upstream PR).\r\n\r\nUpstream PR: https://github.com/odoo/odoo/pull/7823\r\n"},"comment":{"url":"https://api.github.com/repos/OCA/OCB/issues/comments/157642109","html_url":"https://github.com/OCA/OCB/pull/359#issuecomment-157642109","issue_url":"https://api.github.com/repos/OCA/OCB/issues/359","id":157642109,"user":{"login":"clonedagain","id":391953,"avatar_url":"https://avatars.githubusercontent.com/u/391953?v=3","gravatar_id":"","url":"https://api.github.com/users/clonedagain","html_url":"https://github.com/clonedagain","followers_url":"https://api.github.com/users/clonedagain/followers","following_url":"https://api.github.com/users/clonedagain/following{/other_user}","gists_url":"https://api.github.com/users/clonedagain/gists{/gist_id}","starred_url":"https://api.github.com/users/clonedagain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clonedagain/subscriptions","organizations_url":"https://api.github.com/users/clonedagain/orgs","repos_url":"https://api.github.com/users/clonedagain/repos","events_url":"https://api.github.com/users/clonedagain/events{/privacy}","received_events_url":"https://api.github.com/users/clonedagain/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T08:23:14Z","updated_at":"2015-11-18T08:23:14Z","body":"Yes I think we can merge this as is for now, and then someone with better LIFO experience can improve on it."}}