[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

@@ -7,7 +7,7 @@ from odoo.tests.common import TransactionCase
class TestIrActionsReportXml(TransactionCase):
def test_onchange_printer_tray_id_empty(self):
action = self.env['ir.actions.report.xml'].new(
action = self.env['ir.actions.report'].new(
{'printer_tray_id': False})
action.onchange_printing_printer_id()
self.assertFalse(action.printer_tray_id)
@@ -31,7 +31,7 @@ class TestIrActionsReportXml(TransactionCase):
'printer_id': printer.id,
})
action = self.env['ir.actions.report.xml'].new(
action = self.env['ir.actions.report'].new(
{'printer_tray_id': tray.id})
self.assertEqual(action.printer_tray_id, tray)
action.onchange_printing_printer_id()

View File

@@ -104,7 +104,7 @@ class TestPrintingPrinter(TransactionCase):
"""
It should generate the right options dictionnary
"""
report = self.env['ir.actions.report.xml'].search([], limit=1)
report = self.env['ir.actions.report'].search([], limit=1)
action = self.env['printing.report.xml.action'].create({
'user_id': self.env.user.id,
'report_id': report.id,

View File

@@ -36,7 +36,7 @@ class TestPrintingTray(TransactionCase):
def test_report_behaviour(self):
""" It should add the selected tray in the report data """
ir_report = self.env['ir.actions.report.xml'].search([], limit=1)
ir_report = self.env['ir.actions.report'].search([], limit=1)
report = self.env['printing.report.xml.action'].create({
'user_id': self.env.user.id,
'report_id': ir_report.id,