mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] printer_zpl2: black, isort, prettier
This commit is contained in:
@@ -66,7 +66,9 @@ class PrintingLabelZpl2(models.Model):
|
|||||||
default=True,
|
default=True,
|
||||||
)
|
)
|
||||||
action_window_id = fields.Many2one(
|
action_window_id = fields.Many2one(
|
||||||
comodel_name="ir.actions.act_window", string="Action", readonly=True,
|
comodel_name="ir.actions.act_window",
|
||||||
|
string="Action",
|
||||||
|
readonly=True,
|
||||||
)
|
)
|
||||||
test_print_mode = fields.Boolean(string="Mode Print")
|
test_print_mode = fields.Boolean(string="Mode Print")
|
||||||
test_labelary_mode = fields.Boolean(string="Mode Labelary")
|
test_labelary_mode = fields.Boolean(string="Mode Labelary")
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ class TestPrintingLabelZpl2(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_repeatable_component_label_fixed_contents(self):
|
def test_repeatable_component_label_fixed_contents(self):
|
||||||
""" Check contents of a repeatable label component
|
"""Check contents of a repeatable label component
|
||||||
|
|
||||||
Check that a fixed value is repeated each time
|
Check that a fixed value is repeated each time
|
||||||
"""
|
"""
|
||||||
@@ -193,7 +193,7 @@ class TestPrintingLabelZpl2(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_repeatable_component_label_iterable_contents(self):
|
def test_repeatable_component_label_iterable_contents(self):
|
||||||
""" Check contents of a repeatable label component
|
"""Check contents of a repeatable label component
|
||||||
|
|
||||||
Check that an iterable contents (list, tuple, etc.) is browsed
|
Check that an iterable contents (list, tuple, etc.) is browsed
|
||||||
If the repeat_count is higher than the value length, all values are
|
If the repeat_count is higher than the value length, all values are
|
||||||
@@ -247,7 +247,7 @@ class TestPrintingLabelZpl2(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_repeatable_component_label_iterable_offset(self):
|
def test_repeatable_component_label_iterable_offset(self):
|
||||||
""" Check contents of a repeatable label component with an offset
|
"""Check contents of a repeatable label component with an offset
|
||||||
|
|
||||||
Check that an iterable contents (list, tuple, etc.) is browsed
|
Check that an iterable contents (list, tuple, etc.) is browsed
|
||||||
If the repeat_count is higher than the value length, all values are
|
If the repeat_count is higher than the value length, all values are
|
||||||
@@ -777,7 +777,7 @@ class TestPrintingLabelZpl2(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_code49_barcode_label_contents_with_above(self):
|
def test_code49_barcode_label_contents_with_above(self):
|
||||||
""" Check contents of a code 49 barconde label
|
"""Check contents of a code 49 barconde label
|
||||||
with interpretation line above
|
with interpretation line above
|
||||||
"""
|
"""
|
||||||
label = self.new_label()
|
label = self.new_label()
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class TestWizardPrintRecordLabel(TransactionCase):
|
|||||||
cups.Connection().printFile.assert_called_once()
|
cups.Connection().printFile.assert_called_once()
|
||||||
|
|
||||||
def test_wizard_multiple_printers_and_labels(self):
|
def test_wizard_multiple_printers_and_labels(self):
|
||||||
""" Check that printer_id and label_id are not automatically filled
|
"""Check that printer_id and label_id are not automatically filled
|
||||||
when there are multiple possible values
|
when there are multiple possible values
|
||||||
"""
|
"""
|
||||||
self.env["printing.printer"].create(
|
self.env["printing.printer"].create(
|
||||||
@@ -85,7 +85,7 @@ class TestWizardPrintRecordLabel(TransactionCase):
|
|||||||
self.assertEqual(values.get("label_id", False), False)
|
self.assertEqual(values.get("label_id", False), False)
|
||||||
|
|
||||||
def test_wizard_multiple_labels_but_on_different_models(self):
|
def test_wizard_multiple_labels_but_on_different_models(self):
|
||||||
""" Check that label_id is automatically filled when there are multiple
|
"""Check that label_id is automatically filled when there are multiple
|
||||||
labels, but only one on the right model
|
labels, but only one on the right model
|
||||||
"""
|
"""
|
||||||
self.env["printing.label.zpl2"].create(
|
self.env["printing.label.zpl2"].create(
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
# generated from manifests external_dependencies
|
# generated from manifests external_dependencies
|
||||||
pycups
|
pycups
|
||||||
|
zpl2
|
||||||
|
|||||||
1
setup/printer_zpl2/odoo/addons/printer_zpl2
Symbolic link
1
setup/printer_zpl2/odoo/addons/printer_zpl2
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../printer_zpl2
|
||||||
6
setup/printer_zpl2/setup.py
Normal file
6
setup/printer_zpl2/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user