mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[FIX] using logging
This commit is contained in:
committed by
Sylvain GARANCHER
parent
5db700c439
commit
576fbe467e
@@ -41,6 +41,7 @@ import pooler
|
||||
import tools
|
||||
from tools.translate import _
|
||||
from base_calendar import base_calendar
|
||||
import logging
|
||||
|
||||
|
||||
#
|
||||
@@ -232,7 +233,6 @@ res_users()
|
||||
class report_xml(osv.osv):
|
||||
|
||||
def print_direct(self, cr, uid, result, format, printer):
|
||||
logger = netsvc.Logger()
|
||||
fd, file_name = mkstemp()
|
||||
try:
|
||||
os.write(fd, base64.decodestring(result))
|
||||
@@ -249,7 +249,8 @@ class report_xml(osv.osv):
|
||||
cmd = "lpr -l -P %s %s" % (printer_system_name,file_name)
|
||||
else:
|
||||
cmd = "lpr -P %s %s" % (printer_system_name,file_name)
|
||||
logger.notifyChannel("report", netsvc.LOG_INFO,"Printing job : '%s'" % cmd)
|
||||
logger = logging.getLogger('base_report_to_printer')
|
||||
logger.info("Printing job : '%s'" % cmd)
|
||||
os.system(cmd)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user