{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/7182","labels_url":"https://api.github.com/repos/odoo/odoo/issues/7182/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/7182/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/7182/events","html_url":"https://github.com/odoo/odoo/pull/7182","id":89746265,"number":7182,"title":"[FIX] fake error log from product.template","user":{"login":"tvibliani","id":9282767,"avatar_url":"https://avatars.githubusercontent.com/u/9282767?v=3","gravatar_id":"","url":"https://api.github.com/users/tvibliani","html_url":"https://github.com/tvibliani","followers_url":"https://api.github.com/users/tvibliani/followers","following_url":"https://api.github.com/users/tvibliani/following{/other_user}","gists_url":"https://api.github.com/users/tvibliani/gists{/gist_id}","starred_url":"https://api.github.com/users/tvibliani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tvibliani/subscriptions","organizations_url":"https://api.github.com/users/tvibliani/orgs","repos_url":"https://api.github.com/users/tvibliani/repos","events_url":"https://api.github.com/users/tvibliani/events{/privacy}","received_events_url":"https://api.github.com/users/tvibliani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"nim-odoo","id":11041725,"avatar_url":"https://avatars.githubusercontent.com/u/11041725?v=3","gravatar_id":"","url":"https://api.github.com/users/nim-odoo","html_url":"https://github.com/nim-odoo","followers_url":"https://api.github.com/users/nim-odoo/followers","following_url":"https://api.github.com/users/nim-odoo/following{/other_user}","gists_url":"https://api.github.com/users/nim-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-odoo/subscriptions","organizations_url":"https://api.github.com/users/nim-odoo/orgs","repos_url":"https://api.github.com/users/nim-odoo/repos","events_url":"https://api.github.com/users/nim-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/nim-odoo/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-20T09:45:45Z","updated_at":"2015-06-29T12:40:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/7182","html_url":"https://github.com/odoo/odoo/pull/7182","diff_url":"https://github.com/odoo/odoo/pull/7182.diff","patch_url":"https://github.com/odoo/odoo/pull/7182.patch"},"body":"\r\n**This pr fixes Fake Error Log from \"product.template\" model**\r\n\r\nImpacted versions:\r\n\r\n - 8.0\r\n\r\nSteps to reproduce:\r\n\r\n 1. Create some product at \"Sales/Products/products\".\r\n 2. Create/add attributes to the product in order to have multiple product variants.\r\n 3. Sale some variants.\r\n 4. Remove some attribute from the product, such that product variant with this attribute is already sold.\r\n\r\n\r\nCurrent behavior:\r\n\r\nError message comes from [the try block here](https://github.com/odoo/odoo/blob/9ef5e40278b317a022410d418a751d162523005b/addons/product/product.py#L720-L722) and handled properly in [except block](https://github.com/odoo/odoo/blob/9ef5e40278b317a022410d418a751d162523005b/addons/product/product.py#L723-L725) but error ends up to appear in odoo log file anyway:\r\n```\r\n2015-06-20 08:38:15,911 354 ERROR demo openerp.sql_db: bad query: delete from product_product where id IN (4)\r\nTraceback (most recent call last):\r\n  File \"/home/temur/odoo/openerp/sql_db.py\", line 234, in execute\r\n    res = self._obj.execute(query, params)\r\nIntegrityError: update or delete on table \"product_product\" violates foreign key constraint \"sale_order_line_product_id_fkey\" on table \"sale_order_line\"\r\nDETAIL:  Key (id)=(4) is still referenced from table \"sale_order_line\".\r\n\r\n```\r\n\r\n\r\nExpected behavior:\r\n\r\n - No Error log for this case.\r\n"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/116642603","html_url":"https://github.com/odoo/odoo/pull/7182#issuecomment-116642603","issue_url":"https://api.github.com/repos/odoo/odoo/issues/7182","id":116642603,"user":{"login":"nim-odoo","id":11041725,"avatar_url":"https://avatars.githubusercontent.com/u/11041725?v=3","gravatar_id":"","url":"https://api.github.com/users/nim-odoo","html_url":"https://github.com/nim-odoo","followers_url":"https://api.github.com/users/nim-odoo/followers","following_url":"https://api.github.com/users/nim-odoo/following{/other_user}","gists_url":"https://api.github.com/users/nim-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-odoo/subscriptions","organizations_url":"https://api.github.com/users/nim-odoo/orgs","repos_url":"https://api.github.com/users/nim-odoo/repos","events_url":"https://api.github.com/users/nim-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/nim-odoo/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T12:40:48Z","updated_at":"2015-06-29T12:40:48Z","body":"Hello,\r\nWithout any feedback regarding the CLA, I will commit this fix under my name and mention you as \"courtesy of\" in the commit message.\r\nThanks again!"}}