1
# -*- coding: utf-8 -*-
2
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
3
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
5
from odoo import api, fields, models
8
class PrintingReportXMLAction(models.Model):
9
_inherit = 'printing.report.xml.action'
11
printer_tray_id = fields.Many2one(
12
comodel_name='printing.tray',
13
string='Paper Source',
14
domain="[('printer_id', '=', printer_id)]",
20
res = super(PrintingReportXMLAction, self).behaviour()
21
res['tray'] = self.printer_tray_id.system_name
24
@api.onchange('printer_id')
25
def onchange_printer_id(self):
26
""" Reset the tray when the printer is changed """
27
self.printer_tray_id = False