{"action":"opened","issue":{"url":"https://api.github.com/repos/Vauxoo/forecast/issues/56","labels_url":"https://api.github.com/repos/Vauxoo/forecast/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/Vauxoo/forecast/issues/56/comments","events_url":"https://api.github.com/repos/Vauxoo/forecast/issues/56/events","html_url":"https://github.com/Vauxoo/forecast/issues/56","id":109219086,"number":56,"title":"Add product.product relation to forecast model","user":{"login":"zaoral","id":7593953,"avatar_url":"https://avatars.githubusercontent.com/u/7593953?v=3","gravatar_id":"","url":"https://api.github.com/users/zaoral","html_url":"https://github.com/zaoral","followers_url":"https://api.github.com/users/zaoral/followers","following_url":"https://api.github.com/users/zaoral/following{/other_user}","gists_url":"https://api.github.com/users/zaoral/gists{/gist_id}","starred_url":"https://api.github.com/users/zaoral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaoral/subscriptions","organizations_url":"https://api.github.com/users/zaoral/orgs","repos_url":"https://api.github.com/users/zaoral/repos","events_url":"https://api.github.com/users/zaoral/events{/privacy}","received_events_url":"https://api.github.com/users/zaoral/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-01T02:52:22Z","updated_at":"2015-10-01T02:52:22Z","closed_at":null,"body":"\r\n## Feature\r\n\r\n```gherkin\r\nAs a Forecast Manager\r\nI want to correctly extract the Stock History data as Forecast Data.\r\nSo that the product demand forecast functionality work correctly\r\n```\r\n\r\n## Solution\r\n\r\nFor that is necessary to add a relation from forecast model to product.product and make this new field the main one used in all forecast methods instead product.template field. \r\n\r\nThe product template relation should be maintain as a secondary product field that add the usability benefit to easy manage/access all the product template variants forecasts from the product form view (product.template).\r\n\r\n## TODO\r\n\r\n- [ ] Add new product_id field to product.product in the forecast model.\r\n- [ ] Modify the product_tmpl_id field as a related field to the product_id field.\r\n- [ ] Update default product method to use product_id field.\r\n- [ ] Update the display name compute method to work con product_id field.\r\n- [ ] Update the forecast views to add product_id field.\r\n- [ ] Update the forecast views to re-order product_tmpl_id field.\r\n- [ ] Update unit test to work with product_id instead product_tmpl_id.\r\n- [ ] Add search simple/groupby filters by product/product template to be easy to run the functional tests.\r\n- [ ] Update demo data to make that the test have logic. Remove references to product_tmpl_id and use the product_id.\r\n- [ ] Update manual forecast demo data an link to product variants of the same product template.\r\n- [ ] Update/Add ir action windows to manage the button Forecasting from the product variant and product template form views."}}