{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/openupgradelib/issues/21","labels_url":"https://api.github.com/repos/OCA/openupgradelib/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/OCA/openupgradelib/issues/21/comments","events_url":"https://api.github.com/repos/OCA/openupgradelib/issues/21/events","html_url":"https://github.com/OCA/openupgradelib/pull/21","id":108429040,"number":21,"title":"[FIX] Compatibility for OpenERP versions prior to 6.1","user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-26T00:34:28Z","updated_at":"2015-09-28T16:02:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OCA/openupgradelib/pulls/21","html_url":"https://github.com/OCA/openupgradelib/pull/21","diff_url":"https://github.com/OCA/openupgradelib/pull/21.diff","patch_url":"https://github.com/OCA/openupgradelib/pull/21.patch"},"body":"Closes https://github.com/OCA/OpenUpgrade/issues/373\r\n\r\n@sebalix I'm afraid you should check if all used methods are totally compatible with these versions, as the used version for all of them has been 8.0, but with this patch you will be able to load OpenUpgrade 6.0 branch (and I have also checked 5.0).\r\n\r\ncc @StefanRijnhart"},"comment":{"url":"https://api.github.com/repos/OCA/openupgradelib/issues/comments/143789176","html_url":"https://github.com/OCA/openupgradelib/pull/21#issuecomment-143789176","issue_url":"https://api.github.com/repos/OCA/openupgradelib/issues/21","id":143789176,"user":{"login":"pedrobaeza","id":7165771,"avatar_url":"https://avatars.githubusercontent.com/u/7165771?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrobaeza","html_url":"https://github.com/pedrobaeza","followers_url":"https://api.github.com/users/pedrobaeza/followers","following_url":"https://api.github.com/users/pedrobaeza/following{/other_user}","gists_url":"https://api.github.com/users/pedrobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrobaeza/subscriptions","organizations_url":"https://api.github.com/users/pedrobaeza/orgs","repos_url":"https://api.github.com/users/pedrobaeza/repos","events_url":"https://api.github.com/users/pedrobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/pedrobaeza/received_events","type":"User","site_admin":false},"created_at":"2015-09-28T16:02:48Z","updated_at":"2015-09-28T16:02:48Z","body":"Yeah, I missed that one. I already did it in this one: https://github.com/OCA/openupgradelib/pull/21/files#diff-3d7675eb1386de028dab1f879bdc4681R33, but there are some other places where vendor_info is used.\r\n\r\nThe problem I see encapsulating the version detection is that each new Odoo version will need to add some logic to this encapsulation method, but if you see this correct, we can make it via CONSTANTS with growing integers that allows to make comparisons with <, =, >, <=, and we can fallback to a higher value in case none of the current versions are present. What do you think?\r\n```\r\nVERSION_42 = 1\r\nVERSION_50 = 2\r\nVERSION_60 = 3\r\nVERSION_61 = 4\r\nVERSION_70 = 5\r\nVERSION_80 = 6\r\nVERSION_90 = 7\r\nVERSION_UNKNOWN = 99\r\n...\r\nif not hasattr(release, 'version_info'):\r\n    if x:\r\n        version = VERSION_60\r\n   else:\r\n...\r\n```"}}