{"action":"created","issue":{"url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/667","repository_url":"https://api.github.com/repos/Trust-Code/odoo-brasil","labels_url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/667/comments","events_url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/667/events","html_url":"https://github.com/Trust-Code/odoo-brasil/issues/667","id":382327199,"node_id":"MDU6SXNzdWUzODIzMjcxOTk=","number":667,"title":"[11.1] Install br_account take long time in database with account_invoice","user":{"login":"svazquezco","id":12764560,"node_id":"MDQ6VXNlcjEyNzY0NTYw","avatar_url":"https://avatars1.githubusercontent.com/u/12764560?v=4","gravatar_id":"","url":"https://api.github.com/users/svazquezco","html_url":"https://github.com/svazquezco","followers_url":"https://api.github.com/users/svazquezco/followers","following_url":"https://api.github.com/users/svazquezco/following{/other_user}","gists_url":"https://api.github.com/users/svazquezco/gists{/gist_id}","starred_url":"https://api.github.com/users/svazquezco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svazquezco/subscriptions","organizations_url":"https://api.github.com/users/svazquezco/orgs","repos_url":"https://api.github.com/users/svazquezco/repos","events_url":"https://api.github.com/users/svazquezco/events{/privacy}","received_events_url":"https://api.github.com/users/svazquezco/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-19T17:50:46Z","updated_at":"2018-11-27T15:33:58Z","closed_at":"2018-11-27T15:33:58Z","author_association":"NONE","body":"Hi @danimaribeiro ,\r\nI need your help with br_account installation in database with large number of invoices (about 2000) because it's take long time, more than 5 - 6 hours. \r\nI've reviewed the postgresql activity and I've viewed values of account_invoice / account_inovice_line fields are committing one by one instead of in group but I'm not sure this is the problem.\r\nI don't have experience adding many fields at once so have any idea to improve the time of the installation?\r\n\r\nThanks!!"},"comment":{"url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/comments/442102268","html_url":"https://github.com/Trust-Code/odoo-brasil/issues/667#issuecomment-442102268","issue_url":"https://api.github.com/repos/Trust-Code/odoo-brasil/issues/667","id":442102268,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjEwMjI2OA==","user":{"login":"svazquezco","id":12764560,"node_id":"MDQ6VXNlcjEyNzY0NTYw","avatar_url":"https://avatars1.githubusercontent.com/u/12764560?v=4","gravatar_id":"","url":"https://api.github.com/users/svazquezco","html_url":"https://github.com/svazquezco","followers_url":"https://api.github.com/users/svazquezco/followers","following_url":"https://api.github.com/users/svazquezco/following{/other_user}","gists_url":"https://api.github.com/users/svazquezco/gists{/gist_id}","starred_url":"https://api.github.com/users/svazquezco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svazquezco/subscriptions","organizations_url":"https://api.github.com/users/svazquezco/orgs","repos_url":"https://api.github.com/users/svazquezco/repos","events_url":"https://api.github.com/users/svazquezco/events{/privacy}","received_events_url":"https://api.github.com/users/svazquezco/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T15:33:57Z","updated_at":"2018-11-27T15:33:57Z","author_association":"NONE","body":"Thank very much for your help!\r\nDuring installation of br_account module I could see that this sentence was execute in database ->\r\n\r\nUPDATE \"account_invoice\" SET \"reconciled\"=false,\"residual\"='XXX',\"residual_signed\"='XXX',\"residual_company_signed\"='XXX',\"write_uid\"=1,\"write_date\"=(now() at time zone 'UTC') WHERE id IN (XXX);\r\n\r\nI found only one method that write changes in that values ->\r\n\r\nhttps://github.com/odoo/odoo/blob/879a7194788bf36b60dacfc4902a7cf02f21bbe7/addons/account/models/account_invoice.py#L101-L124\r\n\r\nI commented depends decorator of this method:\r\n\r\n![image](https://user-images.githubusercontent.com/12764560/49092359-279b3500-f262-11e8-9cfb-15621825c9ba.png)\r\n\r\nThe installation was done in 20 min instead of 5 - 6 hours.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"svazquezco"}}