{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/comments/36061698","id":36061698,"diff_hunk":"@@ -0,0 +1,61 @@\n+<?xml version=\"1.0\" encoding=\"utf-8\"?>\n+<openerp>\n+<data>\n+\n+<menuitem name=\"Export\"\n+            id=\"menu_export\"\n+            groups=\"base.group_user\"\n+            sequence=\"190\"/>\n+\n+\n+    <record id=\"sql_export_view_form\" model=\"ir.ui.view\">\n+        <field name=\"name\">Sql_export_form_view</field>\n+        <field name=\"model\">sql.export</field>\n+        <field name=\"arch\" type=\"xml\">\n+            <form string=\"SQL export\">\n+                <group col=\"2\">\n+                    <group colspan=\"2\" col=\"5\">\n+                        <label for=\"name\" colspan=\"1\"/>\n+                        <field name=\"name\" colspan=\"2\" nolabel=\"1\"/>\n+                        <button name=\"export_sql_query\" string=\"Execute Query\" type=\"object\" class=\"oe_highlight\" icon=\"gtk-execute\" colspan=\"2\"/>\n+                        <label for=\"query\" colspan=\"1\"/>\n+                        <field name=\"query\" nolabel=\"1\" colspan=\"4\"/>\n+                        <label for=\"Copy Options\" colspan=\"1\"/>\n+                        <field name=\"copy_options\" nolabel=\"1\" colspan=\"4\"/>\n+                    </group>\n+                    <group colspan=\"2\" col=\"2\" groups=\"sql_export.group_sql_request_editor\">\n+                        <separator string=\"Allowed Users\" colspan=\"1\"/>\n+                        <separator string=\"Allowed Users Groups\" colspan=\"1\"/>\n+                        <field name=\"user_ids\" nolabel=\"1\"/>\n+                        <field name=\"group_ids\" nolabel=\"1\"/>\n+                    </group>\n+                </group>\n+            </form>\n+        </field>\n+    </record>\n+\n+    <record id=\"sql_export_view_tree\" model=\"ir.ui.view\">\n+        <field name=\"name\">Sql_export_tree_view</field>\n+        <field name=\"model\">sql.export</field>\n+        <field name=\"arch\" type=\"xml\">\n+            <tree string=\"SQL Export\">\n+                    <field name=\"name\"/>\n+            </tree>\n+        </field>\n+    </record>\n+\n+    <record id=\"sql_export_tree_action\" model=\"ir.actions.act_window\">\n+        <field name=\"name\">SQL Export</field>\n+        <field name=\"res_model\">sql.export</field>\n+        <field name=\"view_type\">form</field>\n+        <field name=\"view_mode\">tree,form</field>\n+    </record>\n+\n+\n+    <menuitem id=\"sql_export_menu\" name=\"Sql Export\" parent=\"menu_export\" sequence=\"1\"/>\n+\n+    <menuitem id=\"sql_export_menu_view\" name=\"Sql Export\" parent=\"sql_export_menu\" action=\"sql_export_tree_action\" sequence=\"1\"/>","path":"sql_export/sql_export_view.xml","position":57,"original_position":57,"commit_id":"c17e0a18c168369b7bbcaa576bf333cff8200471","original_commit_id":"c17e0a18c168369b7bbcaa576bf333cff8200471","user":{"login":"florian-dacosta","id":5393860,"avatar_url":"https://avatars.githubusercontent.com/u/5393860?v=3","gravatar_id":"","url":"https://api.github.com/users/florian-dacosta","html_url":"https://github.com/florian-dacosta","followers_url":"https://api.github.com/users/florian-dacosta/followers","following_url":"https://api.github.com/users/florian-dacosta/following{/other_user}","gists_url":"https://api.github.com/users/florian-dacosta/gists{/gist_id}","starred_url":"https://api.github.com/users/florian-dacosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florian-dacosta/subscriptions","organizations_url":"https://api.github.com/users/florian-dacosta/orgs","repos_url":"https://api.github.com/users/florian-dacosta/repos","events_url":"https://api.github.com/users/florian-dacosta/events{/privacy}","received_events_url":"https://api.github.com/users/florian-dacosta/received_events","type":"User","site_admin":false},"body":"I agree it is annoying to add one more option on the top menu.\r\nThe problem is that this feature can be used by almost every user.\r\nYes, just one or two user should be able to create a new sql request, but the requests can be executed by users in sales, purchases, warehouse, etc...\r\nFor each request, you can add groups or users, that will determine who can read this request. That is why we need to put the menu somewhere every users can have access.","created_at":"2015-08-03T07:33:43Z","updated_at":"2015-08-03T07:33:43Z","html_url":"https://github.com/OCA/server-tools/pull/175#discussion_r36061698","pull_request_url":"https://api.github.com/repos/OCA/server-tools/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/comments/36061698"},"html":{"href":"https://github.com/OCA/server-tools/pull/175#discussion_r36061698"},"pull_request":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/server-tools/pulls/175","id":37146283,"html_url":"https://github.com/OCA/server-tools/pull/175","diff_url":"https://github.com/OCA/server-tools/pull/175.diff","patch_url":"https://github.com/OCA/server-tools/pull/175.patch","issue_url":"https://api.github.com/repos/OCA/server-tools/issues/175","number":175,"state":"open","locked":false,"title":"ADD sql_export module","user":{"login":"florian-dacosta","id":5393860,"avatar_url":"https://avatars.githubusercontent.com/u/5393860?v=3","gravatar_id":"","url":"https://api.github.com/users/florian-dacosta","html_url":"https://github.com/florian-dacosta","followers_url":"https://api.github.com/users/florian-dacosta/followers","following_url":"https://api.github.com/users/florian-dacosta/following{/other_user}","gists_url":"https://api.github.com/users/florian-dacosta/gists{/gist_id}","starred_url":"https://api.github.com/users/florian-dacosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florian-dacosta/subscriptions","organizations_url":"https://api.github.com/users/florian-dacosta/orgs","repos_url":"https://api.github.com/users/florian-dacosta/repos","events_url":"https://api.github.com/users/florian-dacosta/events{/privacy}","received_events_url":"https://api.github.com/users/florian-dacosta/received_events","type":"User","site_admin":false},"body":"This module is usefull when a user knows how to make sql request. He can extract data from the database easily.\r\nHe also can choose wich user is able to use the sql resquest he creates.","created_at":"2015-06-08T12:02:44Z","updated_at":"2015-08-03T07:33:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cb1b4d3245bdb29649ae16b73475366057c7d87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/server-tools/pulls/175/commits","review_comments_url":"https://api.github.com/repos/OCA/server-tools/pulls/175/comments","review_comment_url":"https://api.github.com/repos/OCA/server-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/server-tools/issues/175/comments","statuses_url":"https://api.github.com/repos/OCA/server-tools/statuses/c17e0a18c168369b7bbcaa576bf333cff8200471","head":{"label":"florian-dacosta:7.0-sql-export","ref":"7.0-sql-export","sha":"c17e0a18c168369b7bbcaa576bf333cff8200471","user":{"login":"florian-dacosta","id":5393860,"avatar_url":"https://avatars.githubusercontent.com/u/5393860?v=3","gravatar_id":"","url":"https://api.github.com/users/florian-dacosta","html_url":"https://github.com/florian-dacosta","followers_url":"https://api.github.com/users/florian-dacosta/followers","following_url":"https://api.github.com/users/florian-dacosta/following{/other_user}","gists_url":"https://api.github.com/users/florian-dacosta/gists{/gist_id}","starred_url":"https://api.github.com/users/florian-dacosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florian-dacosta/subscriptions","organizations_url":"https://api.github.com/users/florian-dacosta/orgs","repos_url":"https://api.github.com/users/florian-dacosta/repos","events_url":"https://api.github.com/users/florian-dacosta/events{/privacy}","received_events_url":"https://api.github.com/users/florian-dacosta/received_events","type":"User","site_admin":false},"repo":{"id":37063810,"name":"server-tools","full_name":"florian-dacosta/server-tools","owner":{"login":"florian-dacosta","id":5393860,"avatar_url":"https://avatars.githubusercontent.com/u/5393860?v=3","gravatar_id":"","url":"https://api.github.com/users/florian-dacosta","html_url":"https://github.com/florian-dacosta","followers_url":"https://api.github.com/users/florian-dacosta/followers","following_url":"https://api.github.com/users/florian-dacosta/following{/other_user}","gists_url":"https://api.github.com/users/florian-dacosta/gists{/gist_id}","starred_url":"https://api.github.com/users/florian-dacosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florian-dacosta/subscriptions","organizations_url":"https://api.github.com/users/florian-dacosta/orgs","repos_url":"https://api.github.com/users/florian-dacosta/repos","events_url":"https://api.github.com/users/florian-dacosta/events{/privacy}","received_events_url":"https://api.github.com/users/florian-dacosta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/florian-dacosta/server-tools","description":"Tools for Odoo Administrators to improve some technical features on Odoo.","fork":true,"url":"https://api.github.com/repos/florian-dacosta/server-tools","forks_url":"https://api.github.com/repos/florian-dacosta/server-tools/forks","keys_url":"https://api.github.com/repos/florian-dacosta/server-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/florian-dacosta/server-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/florian-dacosta/server-tools/teams","hooks_url":"https://api.github.com/repos/florian-dacosta/server-tools/hooks","issue_events_url":"https://api.github.com/repos/florian-dacosta/server-tools/issues/events{/number}","events_url":"https://api.github.com/repos/florian-dacosta/server-tools/events","assignees_url":"https://api.github.com/repos/florian-dacosta/server-tools/assignees{/user}","branches_url":"https://api.github.com/repos/florian-dacosta/server-tools/branches{/branch}","tags_url":"https://api.github.com/repos/florian-dacosta/server-tools/tags","blobs_url":"https://api.github.com/repos/florian-dacosta/server-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/florian-dacosta/server-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/florian-dacosta/server-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/florian-dacosta/server-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/florian-dacosta/server-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/florian-dacosta/server-tools/languages","stargazers_url":"https://api.github.com/repos/florian-dacosta/server-tools/stargazers","contributors_url":"https://api.github.com/repos/florian-dacosta/server-tools/contributors","subscribers_url":"https://api.github.com/repos/florian-dacosta/server-tools/subscribers","subscription_url":"https://api.github.com/repos/florian-dacosta/server-tools/subscription","commits_url":"https://api.github.com/repos/florian-dacosta/server-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/florian-dacosta/server-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/florian-dacosta/server-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/florian-dacosta/server-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/florian-dacosta/server-tools/contents/{+path}","compare_url":"https://api.github.com/repos/florian-dacosta/server-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/florian-dacosta/server-tools/merges","archive_url":"https://api.github.com/repos/florian-dacosta/server-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/florian-dacosta/server-tools/downloads","issues_url":"https://api.github.com/repos/florian-dacosta/server-tools/issues{/number}","pulls_url":"https://api.github.com/repos/florian-dacosta/server-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/florian-dacosta/server-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/florian-dacosta/server-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/florian-dacosta/server-tools/labels{/name}","releases_url":"https://api.github.com/repos/florian-dacosta/server-tools/releases{/id}","created_at":"2015-06-08T11:50:51Z","updated_at":"2015-06-08T11:50:52Z","pushed_at":"2015-06-12T14:19:54Z","git_url":"git://github.com/florian-dacosta/server-tools.git","ssh_url":"git@github.com:florian-dacosta/server-tools.git","clone_url":"https://github.com/florian-dacosta/server-tools.git","svn_url":"https://github.com/florian-dacosta/server-tools","homepage":"https://community.odoo.com/project/30","size":1655,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"8.0"}},"base":{"label":"OCA:7.0","ref":"7.0","sha":"03c50717ec18b17309fe0244ad4da20add8cfbb6","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":20896532,"name":"server-tools","full_name":"OCA/server-tools","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/server-tools","description":"Tools for Odoo Administrators to improve some technical features on Odoo.","fork":false,"url":"https://api.github.com/repos/OCA/server-tools","forks_url":"https://api.github.com/repos/OCA/server-tools/forks","keys_url":"https://api.github.com/repos/OCA/server-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/server-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/server-tools/teams","hooks_url":"https://api.github.com/repos/OCA/server-tools/hooks","issue_events_url":"https://api.github.com/repos/OCA/server-tools/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/server-tools/events","assignees_url":"https://api.github.com/repos/OCA/server-tools/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/server-tools/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/server-tools/tags","blobs_url":"https://api.github.com/repos/OCA/server-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/server-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/server-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/server-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/server-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/server-tools/languages","stargazers_url":"https://api.github.com/repos/OCA/server-tools/stargazers","contributors_url":"https://api.github.com/repos/OCA/server-tools/contributors","subscribers_url":"https://api.github.com/repos/OCA/server-tools/subscribers","subscription_url":"https://api.github.com/repos/OCA/server-tools/subscription","commits_url":"https://api.github.com/repos/OCA/server-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/server-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/server-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/server-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/server-tools/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/server-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/server-tools/merges","archive_url":"https://api.github.com/repos/OCA/server-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/server-tools/downloads","issues_url":"https://api.github.com/repos/OCA/server-tools/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/server-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/server-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/server-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/server-tools/labels{/name}","releases_url":"https://api.github.com/repos/OCA/server-tools/releases{/id}","created_at":"2014-06-16T18:52:44Z","updated_at":"2015-07-22T10:44:09Z","pushed_at":"2015-08-03T07:12:33Z","git_url":"git://github.com/OCA/server-tools.git","ssh_url":"git@github.com:OCA/server-tools.git","clone_url":"https://github.com/OCA/server-tools.git","svn_url":"https://github.com/OCA/server-tools","homepage":"https://community.odoo.com/project/30","size":7864,"stargazers_count":58,"watchers_count":58,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":156,"mirror_url":null,"open_issues_count":71,"forks":156,"open_issues":71,"watchers":58,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/175"},"html":{"href":"https://github.com/OCA/server-tools/pull/175"},"issue":{"href":"https://api.github.com/repos/OCA/server-tools/issues/175"},"comments":{"href":"https://api.github.com/repos/OCA/server-tools/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/server-tools/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/server-tools/statuses/c17e0a18c168369b7bbcaa576bf333cff8200471"}}}}