{"action":"closed","number":8208,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/8208","id":43170353,"html_url":"https://github.com/odoo/odoo/pull/8208","diff_url":"https://github.com/odoo/odoo/pull/8208.diff","patch_url":"https://github.com/odoo/odoo/pull/8208.patch","issue_url":"https://api.github.com/repos/odoo/odoo/issues/8208","number":8208,"state":"closed","locked":false,"title":"[FIX][8.0] Schedule days backwards when days is negative number","user":{"login":"antespi","id":1881111,"avatar_url":"https://avatars.githubusercontent.com/u/1881111?v=3","gravatar_id":"","url":"https://api.github.com/users/antespi","html_url":"https://github.com/antespi","followers_url":"https://api.github.com/users/antespi/followers","following_url":"https://api.github.com/users/antespi/following{/other_user}","gists_url":"https://api.github.com/users/antespi/gists{/gist_id}","starred_url":"https://api.github.com/users/antespi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antespi/subscriptions","organizations_url":"https://api.github.com/users/antespi/orgs","repos_url":"https://api.github.com/users/antespi/repos","events_url":"https://api.github.com/users/antespi/events{/privacy}","received_events_url":"https://api.github.com/users/antespi/received_events","type":"User","site_admin":false},"body":"**Schedule days helper method fails when days < 0**\r\n\r\nImpacted versions:\r\n\r\n - 8.0\r\n\r\nSteps to reproduce:\r\n\r\n 1. Call resource.calendar.schedule_days() with days < 0\r\n\r\nCurrent behavior:\r\n\r\n - Returns []\r\n\r\nExpected behavior:\r\n\r\n - Return a list of intervals\r\n\r\nThis PR includes two fixes:\r\n\r\n 1. In ```get_working_intervals_of_day()``` method, avoid crash when no calendar nor ```default_interval``` defined and returns [] as docstring says\r\n 2. In ```_schedule_days()``` method, set ```current_datetime``` to start of the day also in backwards mode because ```get_working_intervals_of_day()``` expects an start_dt not at the end of the day.\r\n","created_at":"2015-08-24T12:46:43Z","updated_at":"2015-08-28T10:34:36Z","closed_at":"2015-08-28T10:34:36Z","merged_at":null,"merge_commit_sha":"6a950e5dc5eb1ca1e50365d496b18830e142f51f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/odoo/odoo/pulls/8208/commits","review_comments_url":"https://api.github.com/repos/odoo/odoo/pulls/8208/comments","review_comment_url":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/8208/comments","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/4acada7cb5b73b63c0efc2bc6b8231425bbc9e14","head":{"label":"Antiun:fix-resource_calendar_backwards","ref":"fix-resource_calendar_backwards","sha":"4acada7cb5b73b63c0efc2bc6b8231425bbc9e14","user":{"login":"Antiun","id":8735718,"avatar_url":"https://avatars.githubusercontent.com/u/8735718?v=3","gravatar_id":"","url":"https://api.github.com/users/Antiun","html_url":"https://github.com/Antiun","followers_url":"https://api.github.com/users/Antiun/followers","following_url":"https://api.github.com/users/Antiun/following{/other_user}","gists_url":"https://api.github.com/users/Antiun/gists{/gist_id}","starred_url":"https://api.github.com/users/Antiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antiun/subscriptions","organizations_url":"https://api.github.com/users/Antiun/orgs","repos_url":"https://api.github.com/users/Antiun/repos","events_url":"https://api.github.com/users/Antiun/events{/privacy}","received_events_url":"https://api.github.com/users/Antiun/received_events","type":"Organization","site_admin":false},"repo":{"id":23914965,"name":"odoo","full_name":"Antiun/odoo","owner":{"login":"Antiun","id":8735718,"avatar_url":"https://avatars.githubusercontent.com/u/8735718?v=3","gravatar_id":"","url":"https://api.github.com/users/Antiun","html_url":"https://github.com/Antiun","followers_url":"https://api.github.com/users/Antiun/followers","following_url":"https://api.github.com/users/Antiun/following{/other_user}","gists_url":"https://api.github.com/users/Antiun/gists{/gist_id}","starred_url":"https://api.github.com/users/Antiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Antiun/subscriptions","organizations_url":"https://api.github.com/users/Antiun/orgs","repos_url":"https://api.github.com/users/Antiun/repos","events_url":"https://api.github.com/users/Antiun/events{/privacy}","received_events_url":"https://api.github.com/users/Antiun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Antiun/odoo","description":"Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.","fork":true,"url":"https://api.github.com/repos/Antiun/odoo","forks_url":"https://api.github.com/repos/Antiun/odoo/forks","keys_url":"https://api.github.com/repos/Antiun/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Antiun/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Antiun/odoo/teams","hooks_url":"https://api.github.com/repos/Antiun/odoo/hooks","issue_events_url":"https://api.github.com/repos/Antiun/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/Antiun/odoo/events","assignees_url":"https://api.github.com/repos/Antiun/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/Antiun/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/Antiun/odoo/tags","blobs_url":"https://api.github.com/repos/Antiun/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Antiun/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Antiun/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Antiun/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Antiun/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/Antiun/odoo/languages","stargazers_url":"https://api.github.com/repos/Antiun/odoo/stargazers","contributors_url":"https://api.github.com/repos/Antiun/odoo/contributors","subscribers_url":"https://api.github.com/repos/Antiun/odoo/subscribers","subscription_url":"https://api.github.com/repos/Antiun/odoo/subscription","commits_url":"https://api.github.com/repos/Antiun/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Antiun/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Antiun/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Antiun/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Antiun/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/Antiun/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Antiun/odoo/merges","archive_url":"https://api.github.com/repos/Antiun/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Antiun/odoo/downloads","issues_url":"https://api.github.com/repos/Antiun/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/Antiun/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/Antiun/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/Antiun/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Antiun/odoo/labels{/name}","releases_url":"https://api.github.com/repos/Antiun/odoo/releases{/id}","created_at":"2014-09-11T11:09:29Z","updated_at":"2015-05-08T12:22:27Z","pushed_at":"2015-08-27T23:33:48Z","git_url":"git://github.com/Antiun/odoo.git","ssh_url":"git@github.com:Antiun/odoo.git","clone_url":"https://github.com/Antiun/odoo.git","svn_url":"https://github.com/Antiun/odoo","homepage":"https://www.odoo.com","size":812441,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"8.0"}},"base":{"label":"odoo:8.0","ref":"8.0","sha":"d744923b6351e63d91ac248a3fd783c619c84e40","user":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"repo":{"id":19745004,"name":"odoo","full_name":"odoo/odoo","owner":{"login":"odoo","id":6368483,"avatar_url":"https://avatars.githubusercontent.com/u/6368483?v=3","gravatar_id":"","url":"https://api.github.com/users/odoo","html_url":"https://github.com/odoo","followers_url":"https://api.github.com/users/odoo/followers","following_url":"https://api.github.com/users/odoo/following{/other_user}","gists_url":"https://api.github.com/users/odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odoo/subscriptions","organizations_url":"https://api.github.com/users/odoo/orgs","repos_url":"https://api.github.com/users/odoo/repos","events_url":"https://api.github.com/users/odoo/events{/privacy}","received_events_url":"https://api.github.com/users/odoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/odoo/odoo","description":"Odoo (formerly OpenERP). Open Source Apps To Grow Your Business.","fork":false,"url":"https://api.github.com/repos/odoo/odoo","forks_url":"https://api.github.com/repos/odoo/odoo/forks","keys_url":"https://api.github.com/repos/odoo/odoo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/odoo/odoo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/odoo/odoo/teams","hooks_url":"https://api.github.com/repos/odoo/odoo/hooks","issue_events_url":"https://api.github.com/repos/odoo/odoo/issues/events{/number}","events_url":"https://api.github.com/repos/odoo/odoo/events","assignees_url":"https://api.github.com/repos/odoo/odoo/assignees{/user}","branches_url":"https://api.github.com/repos/odoo/odoo/branches{/branch}","tags_url":"https://api.github.com/repos/odoo/odoo/tags","blobs_url":"https://api.github.com/repos/odoo/odoo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/odoo/odoo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/odoo/odoo/git/refs{/sha}","trees_url":"https://api.github.com/repos/odoo/odoo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/odoo/odoo/statuses/{sha}","languages_url":"https://api.github.com/repos/odoo/odoo/languages","stargazers_url":"https://api.github.com/repos/odoo/odoo/stargazers","contributors_url":"https://api.github.com/repos/odoo/odoo/contributors","subscribers_url":"https://api.github.com/repos/odoo/odoo/subscribers","subscription_url":"https://api.github.com/repos/odoo/odoo/subscription","commits_url":"https://api.github.com/repos/odoo/odoo/commits{/sha}","git_commits_url":"https://api.github.com/repos/odoo/odoo/git/commits{/sha}","comments_url":"https://api.github.com/repos/odoo/odoo/comments{/number}","issue_comment_url":"https://api.github.com/repos/odoo/odoo/issues/comments{/number}","contents_url":"https://api.github.com/repos/odoo/odoo/contents/{+path}","compare_url":"https://api.github.com/repos/odoo/odoo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/odoo/odoo/merges","archive_url":"https://api.github.com/repos/odoo/odoo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/odoo/odoo/downloads","issues_url":"https://api.github.com/repos/odoo/odoo/issues{/number}","pulls_url":"https://api.github.com/repos/odoo/odoo/pulls{/number}","milestones_url":"https://api.github.com/repos/odoo/odoo/milestones{/number}","notifications_url":"https://api.github.com/repos/odoo/odoo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/odoo/odoo/labels{/name}","releases_url":"https://api.github.com/repos/odoo/odoo/releases{/id}","created_at":"2014-05-13T15:38:58Z","updated_at":"2015-08-28T09:58:28Z","pushed_at":"2015-08-28T10:33:54Z","git_url":"git://github.com/odoo/odoo.git","ssh_url":"git@github.com:odoo/odoo.git","clone_url":"https://github.com/odoo/odoo.git","svn_url":"https://github.com/odoo/odoo","homepage":"https://www.odoo.com","size":1453871,"stargazers_count":2965,"watchers_count":2965,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2558,"mirror_url":null,"open_issues_count":2558,"forks":2558,"open_issues":2558,"watchers":2965,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8208"},"html":{"href":"https://github.com/odoo/odoo/pull/8208"},"issue":{"href":"https://api.github.com/repos/odoo/odoo/issues/8208"},"comments":{"href":"https://api.github.com/repos/odoo/odoo/issues/8208/comments"},"review_comments":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8208/comments"},"review_comment":{"href":"https://api.github.com/repos/odoo/odoo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/odoo/odoo/pulls/8208/commits"},"statuses":{"href":"https://api.github.com/repos/odoo/odoo/statuses/4acada7cb5b73b63c0efc2bc6b8231425bbc9e14"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":7,"review_comments":0,"commits":1,"additions":4,"deletions":4,"changed_files":2}}