mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[MIG] printer_zpl2: Migration to 12.0
This commit is contained in:
committed by
Nils Hamerlinck
parent
7b647116e5
commit
84a14641de
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 Florent Mirieu (<https://github.com/fmdl>)
|
||||
# Copyright (C) 2018 Florent de Labarre (<https://github.com/fmdl>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
@@ -1116,3 +1116,22 @@ class TestPrintingLabelZpl2(TransactionCase):
|
||||
'^FO50,50^GB100,100,100^FS\n'
|
||||
'^JUR\n'
|
||||
'^XZ')
|
||||
|
||||
def test_zpl2_component_not_show(self):
|
||||
""" Check to don't show no things """
|
||||
label = self.new_label()
|
||||
data = 'component_not_show'
|
||||
self.new_component({
|
||||
'label_id': label.id,
|
||||
'component_type': 'zpl2_raw',
|
||||
'data': '"' + data + '"',
|
||||
})
|
||||
contents = label._generate_zpl2_data(self.printer).decode("utf-8")
|
||||
self.assertEqual(
|
||||
contents,
|
||||
'^XA\n'
|
||||
'^PW480\n'
|
||||
'^CI28\n'
|
||||
'^LH10,10\n'
|
||||
'^JUR\n'
|
||||
'^XZ')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 Florent Mirieu (<https://github.com/fmdl>)
|
||||
# Copyright (C) 2018 Florent de Labarre (<https://github.com/fmdl>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
import mock
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018 Florent Mirieu (<https://github.com/fmdl>)
|
||||
# Copyright (C) 2018 Florent de Labarre (<https://github.com/fmdl>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
Reference in New Issue
Block a user