[PORT] Finalize move of printer_tray to base_report_to_printer,

fix tests as report param is not a string but recordset
This commit is contained in:
Graeme Gellatly
2017-10-06 01:33:53 +13:00
55 changed files with 169 additions and 2654 deletions

View File

@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2007 Ferran Pegueroles <ferran@pegueroles.com>
# Copyright (c) 2009 Albert Cervera i Areny <albert@nan-tic.com>
# Copyright (C) 2011 Agile Business Group sagl (<http://www.agilebg.com>)
@@ -33,6 +32,17 @@ class ResUsers(models.Model):
domain="[('printer_id', '=', printing_printer_id)]",
)
@api.model
def _register_hook(self):
self.SELF_WRITEABLE_FIELDS.extend([
'printing_action',
'printing_printer_id',
])
self.SELF_READABLE_FIELDS.extend([
'printing_action',
'printing_printer_id',
])
@api.onchange('printing_printer_id')
def onchange_printing_printer_id(self):
""" Reset the tray when the printer is changed """