Reset the printer's tray when the printer is changed

This commit is contained in:
Guewen Baconnier
2015-01-20 11:44:13 +01:00
parent cfdfc8e3a2
commit cacc5423f6
3 changed files with 17 additions and 2 deletions

View File

@@ -37,3 +37,8 @@ class ReportXMLAction(models.Model):
res = super(ReportXMLAction, self).behaviour()
res['tray'] = self.printer_tray_id.system_name
return res
@api.onchange('printer_id')
def onchange_printer_id(self):
""" Reset the tray when the printer is changed """
self.printer_tray_id = False