Merge pull request #129 from fmdl/11.0

[MIG][11.0] Migrated printer_zpl2 to v11.0
This commit is contained in:
Maxime Chambreuil
2018-04-03 15:44:29 -05:00
committed by GitHub
43 changed files with 18067 additions and 4 deletions

View File

@@ -156,9 +156,6 @@ class PrintingPrinter(models.Model):
@api.multi
def print_options(self, report=None, **print_opts):
options = {}
if not report:
return options
for option, value in print_opts.items():
try:
options.update(getattr(

View File

@@ -71,7 +71,7 @@ class TestPrintingPrinter(TransactionCase):
# with tests in test_printing_printer_tray from when modules merged
report = self.env['ir.actions.report'].search([], limit=1)
self.assertEqual(self.Model.print_options(
report, doc_format='raw'), {'raw': 'True'}
doc_format='raw'), {'raw': 'True'}
)
self.assertEqual(self.Model.print_options(
report, doc_format='pdf', copies=2), {'copies': '2'}