{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/report-print-send/pulls/comments/40648073","id":40648073,"diff_hunk":"@@ -118,6 +143,19 @@ def behaviour(self, cr, uid, ids, context=None):\n             if report.printing_printer_id:\n                 printer = report.printing_printer_id\n \n+            # Retrieve report-company specific values\n+            act_ids = printing_act_obj.search(\n+                cr, uid,\n+                [('report_id', '=', report.id),\n+                 ('company_id', '=', company_id),\n+                 ('action', '!=', 'user_default')], context=context)\n+            if act_ids:\n+                company_action = printing_act_obj.behaviour(\n+                    cr, uid, act_ids[0], context)\n+                action = company_action['action']\n+                if company_action['printer']:\n+                    printer = company_action['printer']\n+\n             # Retrieve report-user specific values\n             act_ids = printing_act_obj.search(\n                 cr, uid,","path":"base_report_to_printer/ir_report.py","position":62,"original_position":62,"commit_id":"7db38787185d4334afb7646e8dc5e51b5050e940","original_commit_id":"7db38787185d4334afb7646e8dc5e51b5050e940","user":{"login":"guewen","id":417223,"avatar_url":"https://avatars.githubusercontent.com/u/417223?v=3","gravatar_id":"","url":"https://api.github.com/users/guewen","html_url":"https://github.com/guewen","followers_url":"https://api.github.com/users/guewen/followers","following_url":"https://api.github.com/users/guewen/following{/other_user}","gists_url":"https://api.github.com/users/guewen/gists{/gist_id}","starred_url":"https://api.github.com/users/guewen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guewen/subscriptions","organizations_url":"https://api.github.com/users/guewen/orgs","repos_url":"https://api.github.com/users/guewen/repos","events_url":"https://api.github.com/users/guewen/events{/privacy}","received_events_url":"https://api.github.com/users/guewen/received_events","type":"User","site_admin":false},"body":"Since we have a company field now, maybe it could be nice to also look for a printer for a user in a company in the search domain below (for multi-company users).\r\n\r\nI mean a query like the following (for : \r\n```\r\n[('report_id', '=', report.id),\r\n                  ('user_id', '=', uid),\r\n                  ('action', '!=', 'user_default'),\r\n                  '|', ('company_id', '=', company_id),\r\n                   ('company_id', '=', False),\r\n]\r\n```","created_at":"2015-09-29T08:53:34Z","updated_at":"2015-09-29T08:53:34Z","html_url":"https://github.com/OCA/report-print-send/pull/34#discussion_r40648073","pull_request_url":"https://api.github.com/repos/OCA/report-print-send/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/comments/40648073"},"html":{"href":"https://github.com/OCA/report-print-send/pull/34#discussion_r40648073"},"pull_request":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/report-print-send/pulls/34","id":46151182,"html_url":"https://github.com/OCA/report-print-send/pull/34","diff_url":"https://github.com/OCA/report-print-send/pull/34.diff","patch_url":"https://github.com/OCA/report-print-send/pull/34.patch","issue_url":"https://api.github.com/repos/OCA/report-print-send/issues/34","number":34,"state":"open","locked":false,"title":"[IMP] base_report_to_printer : new setting","user":{"login":"laetitia-gangloff","id":7602419,"avatar_url":"https://avatars.githubusercontent.com/u/7602419?v=3","gravatar_id":"","url":"https://api.github.com/users/laetitia-gangloff","html_url":"https://github.com/laetitia-gangloff","followers_url":"https://api.github.com/users/laetitia-gangloff/followers","following_url":"https://api.github.com/users/laetitia-gangloff/following{/other_user}","gists_url":"https://api.github.com/users/laetitia-gangloff/gists{/gist_id}","starred_url":"https://api.github.com/users/laetitia-gangloff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laetitia-gangloff/subscriptions","organizations_url":"https://api.github.com/users/laetitia-gangloff/orgs","repos_url":"https://api.github.com/users/laetitia-gangloff/repos","events_url":"https://api.github.com/users/laetitia-gangloff/events{/privacy}","received_events_url":"https://api.github.com/users/laetitia-gangloff/received_events","type":"User","site_admin":false},"body":"per company and report\r\n\r\n\r\nIn multi-company environment, it can be usefull to define printer in function of the company instead of the user.\r\nUse case is the following :\r\n2 companies should print the same report on different printer. User can easily change company.","created_at":"2015-09-28T12:35:16Z","updated_at":"2015-09-29T08:53:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0523d2b94b3d2a65e4183013c04d3c1e92bce908","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OCA/report-print-send/pulls/34/commits","review_comments_url":"https://api.github.com/repos/OCA/report-print-send/pulls/34/comments","review_comment_url":"https://api.github.com/repos/OCA/report-print-send/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/report-print-send/issues/34/comments","statuses_url":"https://api.github.com/repos/OCA/report-print-send/statuses/7db38787185d4334afb7646e8dc5e51b5050e940","head":{"label":"acsone:7.0-base_report_to_printer_company-lga","ref":"7.0-base_report_to_printer_company-lga","sha":"7db38787185d4334afb7646e8dc5e51b5050e940","user":{"login":"acsone","id":7601056,"avatar_url":"https://avatars.githubusercontent.com/u/7601056?v=3","gravatar_id":"","url":"https://api.github.com/users/acsone","html_url":"https://github.com/acsone","followers_url":"https://api.github.com/users/acsone/followers","following_url":"https://api.github.com/users/acsone/following{/other_user}","gists_url":"https://api.github.com/users/acsone/gists{/gist_id}","starred_url":"https://api.github.com/users/acsone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acsone/subscriptions","organizations_url":"https://api.github.com/users/acsone/orgs","repos_url":"https://api.github.com/users/acsone/repos","events_url":"https://api.github.com/users/acsone/events{/privacy}","received_events_url":"https://api.github.com/users/acsone/received_events","type":"Organization","site_admin":false},"repo":{"id":35959487,"name":"report-print-send","full_name":"acsone/report-print-send","owner":{"login":"acsone","id":7601056,"avatar_url":"https://avatars.githubusercontent.com/u/7601056?v=3","gravatar_id":"","url":"https://api.github.com/users/acsone","html_url":"https://github.com/acsone","followers_url":"https://api.github.com/users/acsone/followers","following_url":"https://api.github.com/users/acsone/following{/other_user}","gists_url":"https://api.github.com/users/acsone/gists{/gist_id}","starred_url":"https://api.github.com/users/acsone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acsone/subscriptions","organizations_url":"https://api.github.com/users/acsone/orgs","repos_url":"https://api.github.com/users/acsone/repos","events_url":"https://api.github.com/users/acsone/events{/privacy}","received_events_url":"https://api.github.com/users/acsone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/acsone/report-print-send","description":"Odoo Printing Services and Printer related addons","fork":true,"url":"https://api.github.com/repos/acsone/report-print-send","forks_url":"https://api.github.com/repos/acsone/report-print-send/forks","keys_url":"https://api.github.com/repos/acsone/report-print-send/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acsone/report-print-send/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acsone/report-print-send/teams","hooks_url":"https://api.github.com/repos/acsone/report-print-send/hooks","issue_events_url":"https://api.github.com/repos/acsone/report-print-send/issues/events{/number}","events_url":"https://api.github.com/repos/acsone/report-print-send/events","assignees_url":"https://api.github.com/repos/acsone/report-print-send/assignees{/user}","branches_url":"https://api.github.com/repos/acsone/report-print-send/branches{/branch}","tags_url":"https://api.github.com/repos/acsone/report-print-send/tags","blobs_url":"https://api.github.com/repos/acsone/report-print-send/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acsone/report-print-send/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acsone/report-print-send/git/refs{/sha}","trees_url":"https://api.github.com/repos/acsone/report-print-send/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acsone/report-print-send/statuses/{sha}","languages_url":"https://api.github.com/repos/acsone/report-print-send/languages","stargazers_url":"https://api.github.com/repos/acsone/report-print-send/stargazers","contributors_url":"https://api.github.com/repos/acsone/report-print-send/contributors","subscribers_url":"https://api.github.com/repos/acsone/report-print-send/subscribers","subscription_url":"https://api.github.com/repos/acsone/report-print-send/subscription","commits_url":"https://api.github.com/repos/acsone/report-print-send/commits{/sha}","git_commits_url":"https://api.github.com/repos/acsone/report-print-send/git/commits{/sha}","comments_url":"https://api.github.com/repos/acsone/report-print-send/comments{/number}","issue_comment_url":"https://api.github.com/repos/acsone/report-print-send/issues/comments{/number}","contents_url":"https://api.github.com/repos/acsone/report-print-send/contents/{+path}","compare_url":"https://api.github.com/repos/acsone/report-print-send/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acsone/report-print-send/merges","archive_url":"https://api.github.com/repos/acsone/report-print-send/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acsone/report-print-send/downloads","issues_url":"https://api.github.com/repos/acsone/report-print-send/issues{/number}","pulls_url":"https://api.github.com/repos/acsone/report-print-send/pulls{/number}","milestones_url":"https://api.github.com/repos/acsone/report-print-send/milestones{/number}","notifications_url":"https://api.github.com/repos/acsone/report-print-send/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acsone/report-print-send/labels{/name}","releases_url":"https://api.github.com/repos/acsone/report-print-send/releases{/id}","created_at":"2015-05-20T16:17:02Z","updated_at":"2015-05-20T16:17:02Z","pushed_at":"2015-09-28T12:32:00Z","git_url":"git://github.com/acsone/report-print-send.git","ssh_url":"git@github.com:acsone/report-print-send.git","clone_url":"https://github.com/acsone/report-print-send.git","svn_url":"https://github.com/acsone/report-print-send","homepage":"","size":384,"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":"14e9b3e24de82ce3526f33a4ae22e38e7ca43ca9","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":20896324,"name":"report-print-send","full_name":"OCA/report-print-send","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/report-print-send","description":"Odoo Printing Services and Printer related addons","fork":false,"url":"https://api.github.com/repos/OCA/report-print-send","forks_url":"https://api.github.com/repos/OCA/report-print-send/forks","keys_url":"https://api.github.com/repos/OCA/report-print-send/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/report-print-send/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/report-print-send/teams","hooks_url":"https://api.github.com/repos/OCA/report-print-send/hooks","issue_events_url":"https://api.github.com/repos/OCA/report-print-send/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/report-print-send/events","assignees_url":"https://api.github.com/repos/OCA/report-print-send/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/report-print-send/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/report-print-send/tags","blobs_url":"https://api.github.com/repos/OCA/report-print-send/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/report-print-send/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/report-print-send/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/report-print-send/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/report-print-send/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/report-print-send/languages","stargazers_url":"https://api.github.com/repos/OCA/report-print-send/stargazers","contributors_url":"https://api.github.com/repos/OCA/report-print-send/contributors","subscribers_url":"https://api.github.com/repos/OCA/report-print-send/subscribers","subscription_url":"https://api.github.com/repos/OCA/report-print-send/subscription","commits_url":"https://api.github.com/repos/OCA/report-print-send/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/report-print-send/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/report-print-send/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/report-print-send/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/report-print-send/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/report-print-send/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/report-print-send/merges","archive_url":"https://api.github.com/repos/OCA/report-print-send/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/report-print-send/downloads","issues_url":"https://api.github.com/repos/OCA/report-print-send/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/report-print-send/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/report-print-send/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/report-print-send/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/report-print-send/labels{/name}","releases_url":"https://api.github.com/repos/OCA/report-print-send/releases{/id}","created_at":"2014-06-16T18:47:24Z","updated_at":"2015-08-30T12:57:37Z","pushed_at":"2015-09-28T12:35:16Z","git_url":"git://github.com/OCA/report-print-send.git","ssh_url":"git@github.com:OCA/report-print-send.git","clone_url":"https://github.com/OCA/report-print-send.git","svn_url":"https://github.com/OCA/report-print-send","homepage":"","size":819,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":3,"forks":34,"open_issues":3,"watchers":12,"default_branch":"8.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/34"},"html":{"href":"https://github.com/OCA/report-print-send/pull/34"},"issue":{"href":"https://api.github.com/repos/OCA/report-print-send/issues/34"},"comments":{"href":"https://api.github.com/repos/OCA/report-print-send/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/report-print-send/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/report-print-send/statuses/7db38787185d4334afb7646e8dc5e51b5050e940"}}}}