printer_tray: Allow to call print_option with no report

This commit is contained in:
Sylvain GARANCHER
2016-11-17 09:57:38 +01:00
committed by Graeme Gellatly
parent c59f9d6dd0
commit e11cf228f1
2 changed files with 22 additions and 15 deletions

View File

@@ -113,6 +113,11 @@ class TestPrintingPrinter(TransactionCase):
'system_name': 'Action tray',
})
# No report passed
self.env.user.printer_tray_id = False
options = self.Model.print_options()
self.assertFalse('InputSlot' in options)
# No tray defined
self.env.user.printer_tray_id = False
report.printer_tray_id = False