Lionel Sausin - Numérigraphe has proposed merging lp:~numerigraphe-team/report-print-send/7.0-user-browse-lp1116672-ls into lp:report-print-send.
Requested reviews: Report Printing and Sending Core Editors (report-print-send-core-editors) Related bugs: Bug #1116672 in Report - Printing and Sending: "[base_report_to_printer] User-specific defaults don't work" https://bugs.launchpad.net/report-print-send/+bug/1116672 For more details, see: https://code.launchpad.net/~numerigraphe-team/report-print-send/7.0-user-browse-lp1116672-ls/+merge/216356 Fix missing arguments in browse call which prevents user-defined defaults to be considered. -- https://code.launchpad.net/~numerigraphe-team/report-print-send/7.0-user-browse-lp1116672-ls/+merge/216356 Your team Report Printing and Sending Core Editors is requested to review the proposed merge of lp:~numerigraphe-team/report-print-send/7.0-user-browse-lp1116672-ls into lp:report-print-send.
=== modified file 'base_report_to_printer/ir_report.py' --- base_report_to_printer/ir_report.py 2013-10-02 12:08:48 +0000 +++ base_report_to_printer/ir_report.py 2014-04-17 16:03:45 +0000 @@ -47,7 +47,6 @@ return options def print_direct(self, cr, uid, report_id, result, format, printer, context=None): - user_obj = self.pool.get('res.users') fd, file_name = mkstemp() try: os.write(fd, base64.decodestring(result)) @@ -94,9 +93,9 @@ if default_printer: default_printer = printer_obj.browse(cr, uid, default_printer, context=context) - # Retrieve user default values - user = self.pool.get('res.users').browse(cr, uid, context) + user = self.pool.get('res.users').browse( + cr, uid, [uid], context=context)[0] if user.printing_action: default_action = user.printing_action if user.printing_printer_id:
-- Mailing list: https://launchpad.net/~openerp-community-reviewer Post to : openerp-community-reviewer@lists.launchpad.net Unsubscribe : https://launchpad.net/~openerp-community-reviewer More help : https://help.launchpad.net/ListHelp