mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] base_report_to_printer: Add test coverage
* Add test coverage * Minor touch ups in wizard * Prefer UserError to Warning
This commit is contained in:
@@ -26,9 +26,8 @@ class PrintingPrinterUpdateWizard(models.TransientModel):
|
||||
_name = 'printing.printer.update.wizard'
|
||||
_description = 'Printing Printer Update Wizard'
|
||||
|
||||
@api.multi
|
||||
@api.model
|
||||
def action_ok(self):
|
||||
self.ensure_one()
|
||||
# Update Printers
|
||||
printer_obj = self.env['printing.printer']
|
||||
try:
|
||||
@@ -57,7 +56,7 @@ class PrintingPrinterUpdateWizard(models.TransientModel):
|
||||
'location': printer.get('printer-location', False),
|
||||
'uri': printer.get('device-uri', False),
|
||||
}
|
||||
self.env['printing.printer'].create(values)
|
||||
printer_obj.create(values)
|
||||
_logger.info(
|
||||
'Created new printer %s with URI %s'
|
||||
% (values['name'], values['uri']))
|
||||
|
||||
Reference in New Issue
Block a user