{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/15604","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/15604/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/15604/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/15604/events","html_url":"https://github.com/odoo/odoo/pull/15604","id":209588525,"number":15604,"title":"Compute fields total/expected margin in product margin report","user":{"login":"zaoral","id":7593953,"avatar_url":"https://avatars3.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,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-22T21:35:20Z","updated_at":"2017-02-28T17:41:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/15604","html_url":"https://github.com/odoo/odoo/pull/15604","diff_url":"https://github.com/odoo/odoo/pull/15604.diff","patch_url":"https://github.com/odoo/odoo/pull/15604.patch"},"body":"**Description of the issue/feature this PR addresses:**\r\n\r\nSeveral compute fields are not working in the Product model when I choose to view the Products Margin report. This can be done by going to Accounting > Reports > Management > Products Margins\r\n\r\n**Current behavior before PR:**\r\n\r\n![image](https://cloud.githubusercontent.com/assets/7593953/23230443/93fb0d46-f909-11e6-980a-d97cfb831c7e.png)\r\n\r\nThe next fields were set to 0 and were not computed as supposed to:\r\n\r\n- date_from\r\n- date_to\r\n- invoice_state\r\n- total_margin\r\n- expected_margin\r\n- total_margin_rate\r\n- expected_margin_rate\r\n\r\n**Desired behavior after PR is merged:**\r\n\r\nThe computed fields are properly compute,\r\n\r\n![image](https://cloud.githubusercontent.com/assets/7593953/23233424/6dcc1786-f914-11e6-8753-3d3ba7000b3e.png)\r\n\r\n\r\n--\r\nI confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/283111334","html_url":"https://github.com/odoo/odoo/pull/15604#issuecomment-283111334","issue_url":"https://api.github.com/repos/odoo/odoo/issues/15604","id":283111334,"user":{"login":"zaoral","id":7593953,"avatar_url":"https://avatars3.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},"created_at":"2017-02-28T17:41:41Z","updated_at":"2017-02-28T17:41:41Z","body":"Hi @simongoffin why create a new PR and do not use the one already propuse?\r\n\r\nIMHO I think that the current PR is more complete in the changes made because:\r\n- remove the extra argument fields_name to do not generate any confusion\r\n- add the api.depends properly to this compute method\r\n- do not return any dictionary since is not necessary-\r\n"}}
{"actor":{"display_login":"zaoral"}}