{"action":"created","issue":{"url":"https://api.github.com/repos/OCA/mis-builder/issues/91","repository_url":"https://api.github.com/repos/OCA/mis-builder","labels_url":"https://api.github.com/repos/OCA/mis-builder/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/OCA/mis-builder/issues/91/comments","events_url":"https://api.github.com/repos/OCA/mis-builder/issues/91/events","html_url":"https://github.com/OCA/mis-builder/issues/91","id":320763417,"number":91,"title":"Cash Flow Forecast","user":{"login":"jjscarafia","id":3016656,"avatar_url":"https://avatars3.githubusercontent.com/u/3016656?v=4","gravatar_id":"","url":"https://api.github.com/users/jjscarafia","html_url":"https://github.com/jjscarafia","followers_url":"https://api.github.com/users/jjscarafia/followers","following_url":"https://api.github.com/users/jjscarafia/following{/other_user}","gists_url":"https://api.github.com/users/jjscarafia/gists{/gist_id}","starred_url":"https://api.github.com/users/jjscarafia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjscarafia/subscriptions","organizations_url":"https://api.github.com/users/jjscarafia/orgs","repos_url":"https://api.github.com/users/jjscarafia/repos","events_url":"https://api.github.com/users/jjscarafia/events{/privacy}","received_events_url":"https://api.github.com/users/jjscarafia/received_events","type":"User","site_admin":false},"labels":[{"id":706778139,"url":"https://api.github.com/repos/OCA/mis-builder/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-07T11:05:59Z","updated_at":"2018-05-10T21:18:46Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Anyone working or planning a cash flow forecast using mis_builder?\r\n\r\nIf I'm no wrong it would be great to allow account.move.line analysis via de date_maturity field. It could be solved by mis_bilder queries by I think it would be better (and easier) to allow using date_maturity directly with some parameter on kpis.\r\n\r\n@sbidoul any thoughts to share?\r\n\r\nBR!"},"comment":{"url":"https://api.github.com/repos/OCA/mis-builder/issues/comments/388189247","html_url":"https://github.com/OCA/mis-builder/issues/91#issuecomment-388189247","issue_url":"https://api.github.com/repos/OCA/mis-builder/issues/91","id":388189247,"user":{"login":"sbidoul","id":692075,"avatar_url":"https://avatars2.githubusercontent.com/u/692075?v=4","gravatar_id":"","url":"https://api.github.com/users/sbidoul","html_url":"https://github.com/sbidoul","followers_url":"https://api.github.com/users/sbidoul/followers","following_url":"https://api.github.com/users/sbidoul/following{/other_user}","gists_url":"https://api.github.com/users/sbidoul/gists{/gist_id}","starred_url":"https://api.github.com/users/sbidoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbidoul/subscriptions","organizations_url":"https://api.github.com/users/sbidoul/orgs","repos_url":"https://api.github.com/users/sbidoul/repos","events_url":"https://api.github.com/users/sbidoul/events{/privacy}","received_events_url":"https://api.github.com/users/sbidoul/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T21:18:46Z","updated_at":"2018-05-10T21:18:46Z","author_association":"OWNER","body":"Having some forecasting feature, in an extension module or in mis_builder core, would be definitely great. And PR are always welcome, that's for sure.\r\n\r\nI think it will not be enough to change the method you suggest, though. If you follow that path you will see that you will need to select date or date_maturity at the column level, not kpi as you initially proposed. And I'm not sure how that would work for your use case. Selecting date/date_maturity at the kpi level is a much more profound change. And that too would not necessarily solve your use case.\r\n\r\nSo my intuition so far, is that it's better that you experiment with a new SQL view. Depending on the conclusions of that experiment we can then see what's the best approach.\r\n\r\nAt first glance, that view should be a union of \r\n- all move lines (by their original date) for liquidity accounts\r\n- all move lines (by date_maturity) for payable/receivable accounts (probably keeping only unreconciled move lines)\r\n\r\nThen the report template would have kpis such as (pseudocode)\r\n- cash = bale[account_id.type = liquidity] \r\n- in = bale[account_id.type = receivable]\r\n- out = bale[account_id.type = payable]\r\n\r\nThen in the report:\r\n- the first column with source = account move, end date = today.\r\n- then a column for each future period with source = the new view and end dates in the future\r\n\r\nBut don't take my word for it, I might very well miss something :)"}}
{"actor":{"display_login":"sbidoul"}}