[PORT] Printer Tray to V11

This commit is contained in:
Graeme Gellatly
2017-10-05 05:26:24 +13:00
parent a251376768
commit 8bfea53fec
11 changed files with 81 additions and 85 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright (C) 2013-2014 Camptocamp (<http://www.camptocamp.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
printer_tray_id = fields.Many2one(
comodel_name='printing.tray',
string='Paper Source',
domain="[('printer_id', '=', printing_printer_id)]",
)
@api.onchange('printing_printer_id')
def onchange_printing_printer_id(self):
""" Reset the tray when the printer is changed """
self.printer_tray_id = False