mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[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:
@@ -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 """
|
||||
|
||||
Reference in New Issue
Block a user