{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/account-financial-tools/issues/301","labels_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/301/comments","events_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/301/events","html_url":"https://github.com/OCA/account-financial-tools/issues/301","id":107806270,"number":301,"title":"8.0 currency_rate_update: failed update blocks all future updates","user":{"login":"alexis-via","id":1157917,"avatar_url":"https://avatars.githubusercontent.com/u/1157917?v=3","gravatar_id":"","url":"https://api.github.com/users/alexis-via","html_url":"https://github.com/alexis-via","followers_url":"https://api.github.com/users/alexis-via/followers","following_url":"https://api.github.com/users/alexis-via/following{/other_user}","gists_url":"https://api.github.com/users/alexis-via/gists{/gist_id}","starred_url":"https://api.github.com/users/alexis-via/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexis-via/subscriptions","organizations_url":"https://api.github.com/users/alexis-via/orgs","repos_url":"https://api.github.com/users/alexis-via/repos","events_url":"https://api.github.com/users/alexis-via/events{/privacy}","received_events_url":"https://api.github.com/users/alexis-via/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-09-22T21:25:48Z","updated_at":"2015-09-23T07:25:54Z","closed_at":null,"body":"I am experiencing this issue with several customers in v8.0 that use currency_rate_update with a simple configuration:\r\n- 1 service provider\r\n- cron activated with a daily frequency\r\nIf, for some strange reasons, the field next_run is not correctly updated on one particular run (I still need to understand exactly why), the future runs will fail because of the line of code:\r\n```\r\nservices = self.search([('next_run', '=', fields.Date.today())])\r\n```\r\nThis is a new behavior of v8, it was not like that in v7. It is causing at lot of failures with my v8 customers that use currency_rate_update in production. Maybe we should change this line of code by:\r\n\r\n```\r\nservices = self.search([('next_run', '<=', fields.Date.today())])\r\n```\r\nSo that, if one run started by cron fails (and next_run is not correctly updated), then the next runs started by cron will be executed. What do you think ?"},"comment":{"url":"https://api.github.com/repos/OCA/account-financial-tools/issues/comments/142518656","html_url":"https://github.com/OCA/account-financial-tools/issues/301#issuecomment-142518656","issue_url":"https://api.github.com/repos/OCA/account-financial-tools/issues/301","id":142518656,"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-23T07:25:54Z","updated_at":"2015-09-23T07:25:54Z","body":"I'm not worried about that: you are providing the correct rate for the correct rate, although with a jump. Providing a way to notify the admin and to retrieve a rate for a specific date, the circle is closed.\r\n\r\nEven thinking your fully-automated scheme, you just simply run multiple times between last_run + frequency date to today incrementing each time the frequency required, but breaking the loop when one update fails."}}